Skip to main content

DjaoDjin's Implementation of Frictionless Sign Up

Project description

This code 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.

Tested with

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](https://github.com/djaodjin/djaoapp/).

Install

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

urls.py:

urlpatterns = (‘’,

(r’^api/’, include(‘signup.urls.api’)), (r’^’, include(‘signup.urls.views’)),

)

settings.py:

AUTHENTICATION_BACKENDS = (

‘signup.backends.auth.EmailOrUsernameModelBackend’, ‘django.contrib.auth.backends.ModelBackend’

)

To make the application useable accross a variety of websites, signup never sends any e-mails directly. It relies on triggering signals whenever a notification must be generated. As a result, to verify a user email address and activate her account, you will need to implement a listener for the user_verification signal and send the e-mail from there.

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 _installTop_ $ source _installTop_/bin/activate $ pip install -r testsite/requirements.txt $ python manage.py syncdb $ python manage.py loaddata testsite/fixtures/test_data.json $ python manage.py runserver

# Browse http://localhost:8000/

Release Notes

0.4.0

  • upload of contact picture

  • use full_name in user profile instead of first_name/last_name

  • use inline-template for Vue.js components

  • clean separation between API endpoints and HTML pages URLs

[previous release notes](changelog)

Project details


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.4.1.tar.gz (58.5 kB view details)

Uploaded Source

File details

Details for the file djaodjin-signup-0.4.1.tar.gz.

File metadata

  • Download URL: djaodjin-signup-0.4.1.tar.gz
  • Upload date:
  • Size: 58.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.5

File hashes

Hashes for djaodjin-signup-0.4.1.tar.gz
Algorithm Hash digest
SHA256 12495345cf59f7735ccd0a53e42537eb5231c771da02991f73afeadf326e6876
MD5 94fd57eccacfd2710baa292557595923
BLAKE2b-256 afe9a93500399b6b257ab801b4bcbdadda3a2020dcca7e328ce1bef1cea3083e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page