Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/idlesign/django-sitegate
Reusable application for Django to ease sign up & sign in processes
https://github.com/idlesign/django-sitegate
authentication authorization django python signin signup
Last synced: 11 days ago
JSON representation
Reusable application for Django to ease sign up & sign in processes
- Host: GitHub
- URL: https://github.com/idlesign/django-sitegate
- Owner: idlesign
- License: bsd-3-clause
- Created: 2013-05-12T16:01:39.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2022-11-27T06:01:23.000Z (almost 2 years ago)
- Last Synced: 2024-10-29T20:55:57.783Z (14 days ago)
- Topics: authentication, authorization, django, python, signin, signup
- Language: Python
- Homepage: https://github.com/idlesign/django-sitegate
- Size: 321 KB
- Stars: 34
- Watchers: 6
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG
- License: LICENSE
Awesome Lists containing this project
README
django-sitegate
===============
http://github.com/idlesign/django-sitegate.. image:: https://img.shields.io/pypi/v/django-sitegate.svg
:target: https://pypi.python.org/pypi/django-sitegate.. image:: https://img.shields.io/pypi/l/django-sitegate.svg
:target: https://pypi.python.org/pypi/django-sitegate.. image:: https://img.shields.io/coveralls/idlesign/django-sitegate/master.svg
:target: https://coveralls.io/r/idlesign/django-sitegateWhat'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
* Yandex**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 confirmationQuick example
-------------Here follows the most straightforward way possible with ``django-sitegate`` to have both sign up & sign in
functionality on your page.1. Use ``sitegate_view`` decorator to mark your view as the one handling both signups and signins:
.. code-block:: python
from django.shortcuts import render
from sitegate.toolbox 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'})2. 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... code-block:: html
{% extends "_base.html" %}
{% load sitegate %}{% block page_contents %}
{% sitegate_signin_form %}
{% sitegate_signup_form %}
{% 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**. Read the docs.
Documentation
-------------http://django-sitegate.readthedocs.org/