项目作者: djaodjin

项目描述 :
Django app for frictionless signup
高级语言: Python
项目地址: git://github.com/djaodjin/djaodjin-signup.git
创建时间: 2014-05-13T17:06:29Z
项目社区:https://github.com/djaodjin/djaodjin-signup

开源协议:BSD 2-Clause "Simplified" License

下载


DjaoDjin-Signup

PyPI version

This repository contains a Django App for frictionless signup.

The app will register and login a user with as little as only an email address.

When the user logs out and tries to logs back in with the same email address,
the app will first verify the email address through an activation url send
to the registered email address. Setting the password is deferred to after
the email address has been verified.

If during the first login and/or subsequent login, the email address should
be verified before moving forward (ex: before presenting a payment view),
you should decorate the view with an active_required decorator.

This project contains bare bone templates which are compatible with Django
and Jinja2 template engines. To see djaodjin-signup in action as part
of a full-fledged subscription-based session proxy, take a look
at djaoapp.

Install

Add the signup urls to your urlpatterns and EmailOrUsernameModelBackend
to the settings AUTHENTICATION_BACKENDS.

  1. urls.py:
  2. urlpatterns = ('',
  3. (r'^api/', include('signup.urls.api')),
  4. (r'^', include('signup.urls.views')),
  5. )
  6. settings.py:
  7. AUTHENTICATION_BACKENDS = (
  8. 'signup.backends.auth.EmailOrUsernameModelBackend',
  9. 'django.contrib.auth.backends.ModelBackend'
  10. )

Development

After cloning the repository, create a virtualenv environment, install
the prerequisites, create and load initial data into the database, then
run the testsite webapp.

  1. $ python -m venv .venv
  2. $ source .venv/bin/activate
  3. $ pip install -r testsite/requirements.txt
  4. $ make vendor-assets-prerequisites
  5. $ make initdb
  6. $ python manage.py runserver
  7. # Browse http://localhost:8000/

Release Notes

Tested with

  • Python: 3.10, Django: 4.2 (LTS)
  • Python: 3.12, Django: 5.1 (next)
  • Python: 3.7, Django: 3.2 (legacy)

0.9.10

  • respects registration disabled / auth enabled

previous release notes