http://github.com/idlesign/django-sitegate
What’s that
django-sitegate is a reusable application for Django to ease sign up & sign in processes.
This application will handle most common user registration and log in flows for you.
Sign in
username/e-mail + password
username + password
Sign up
username/e-mail + password
invitation code + username/e-mail + password
username + password
username + e-mail + password
username + password + password confirmation
username + e-mail + password + password confirmation
Quick example
Add the sitegate application to INSTALLED_APPS in your settings file (usually ‘settings.py’).
Make sure TEMPLATE_CONTEXT_PROCESSORS in your settings file has django.core.context_processors.request.
Here follows the most straightforward way possible with django-sitegate to have both sign up & sign in functionality on your page.
Use sitegate_view decorator to mark your view as the one handling both signups and signins:
from django.shortcuts import render from sitegate.decorators import sitegate_view @sitegate_view # This also prevents logged in users from accessing our sign in/sign up page. def entrance(request): return render(request, 'entrance.html', {'title': 'Sign in & Sign up'})Then in your template load sitegate tag library and put sitegate_signup_form & sitegate_signin_form tags in place where you want a registration and sign in forms to be.
{% extends "_base.html" %} {% load sitegate %} {% block page_contents %} <div class="my_signin_block"> {% sitegate_signin_form %} </div> <div class="my_signup_block"> {% sitegate_signup_form %} </div> {% endblock %}
You’re done. Now your site visitors have an e-mail + password form to register and username/e-mail + password form to log in.
And mind that we’ve barely made a scratch of sitegate.
Documentation
http://django-sitegate.readthedocs.org/
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-sitegate-0.6.1.tar.gz.
File metadata
- Download URL: django-sitegate-0.6.1.tar.gz
- Upload date:
- Size: 30.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb04ec43490d0c018ec75b2c1111ceb520fd37a045e1e4ff59bdd3f9d6f0429d
|
|
| MD5 |
15370aa4fabfb1da05fd786bd88cb400
|
|
| BLAKE2b-256 |
89bf0b5d91d8d8d5f3ca4c186484691ccd7c1bf9922e2fee1e4864ccb13f0627
|