DjaoDjin's Implementation of Frictionless Sign Up
Project description
This code was taken out of [djaodjin](http://djaodjin.com/) main repo,
generalized and open sourced as a frictionless signup Django app.
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.
Install
=======
Add the signup urls to your urlpatterns and EmailOrUsernameModelBackend
to the settings AUTHENTICATION_BACKENDS.
urls.py:
urlpatterns = ('',
(r'^accounts/', include('signup.urls')),
)
settings.py:
AUTHENTICATION_BACKENDS = (
'signup.backends.auth.EmailOrUsernameModelBackend',
'django.contrib.auth.backends.ModelBackend'
)
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.
$ virtualenv-2.7 _installTop_
$ source _installTop_/bin/activate
$ pip install -r requirements.txt
$ python manage.py syncdb
$ python manage.py loaddata testsite/fixtures/test_data.json
$ python manage.py runserver
# Browse http://localhost:8000/
generalized and open sourced as a frictionless signup Django app.
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.
Install
=======
Add the signup urls to your urlpatterns and EmailOrUsernameModelBackend
to the settings AUTHENTICATION_BACKENDS.
urls.py:
urlpatterns = ('',
(r'^accounts/', include('signup.urls')),
)
settings.py:
AUTHENTICATION_BACKENDS = (
'signup.backends.auth.EmailOrUsernameModelBackend',
'django.contrib.auth.backends.ModelBackend'
)
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.
$ virtualenv-2.7 _installTop_
$ source _installTop_/bin/activate
$ pip install -r requirements.txt
$ python manage.py syncdb
$ python manage.py loaddata testsite/fixtures/test_data.json
$ python manage.py runserver
# Browse http://localhost:8000/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
djaodjin-signup-0.1.7.tar.gz
(15.8 kB
view hashes)