Django-registration (redux) provides user registration functionality for Django websites.

Overview
Description: Django-registration provides user registration functionality for Django websites.
maintainers: Macropin, DiCato, and joshblum
contributors: list of contributors
https://travis-ci.org/macropin/django-registration.svg?branch=master https://coveralls.io/repos/macropin/django-registration/badge.svg?branch=master Documentation Status

If you have issues with the "django-registration-redux" package then please raise them here.

This is a fairly simple user-registration application for Django, designed to make allowing user signups as painless as possible. It requires a functional installation of Django 2.0 or newer, but has no other dependencies.

Installation

Install, upgrade and uninstall django-registration-redux with these commands:

pip install django-registration-redux
pip install --upgrade django-registration-redux
pip uninstall django-registration-redux

To install it manually, run the following command inside this source directory:

python setup.py install

Or if you'd prefer you can simply place the included registration directory somewhere on your Python path, or symlink to it from somewhere on your Python path; this is useful if you're working from a Git checkout.

Note that this application requires Python 3.5 or later, and a functional installation of Django 2.0 or newer.

If you are running on Django <=2.0, you can install a previous version of django-registration-redux, which supports older versions of Django. See the CHANGELOG for support details. Older versions will receive minor bug fixes as needed, but are no longer actively developed:

pip install django-registration-redux==1.10

Getting started with development

To get started with development, first install the required packages:

make installdeps

For convenience a Makefile is included which wraps the Python invoke library. Once you work on a patch, you can test the functionality by running:

make test

Or equivalently:

invoke test

Command line arguments can be passed to the invoke script through the Makefile via the ARGS parameter. For example:

make build ARGS=--docs

Or equivalently:

invoke build --docs

Alternatives

djangopackages.com has a comprehensive comparison of Django packages used for user registration and authentication.

For example, django-allauth is an alternative to django-registration-redux that provides user registration in addition to social authentication and email address management.

License

Django-registration-redux is licensed under BSD License.

Comments
  • Add 3-step registration workflow by implementing another registration backend

    Add 3-step registration workflow by implementing another registration backend

    This includes the changes required to implement a 3-step registration workflow.

    1. User registers an account - is emailed with an activation token
    2. User activates the account - site administrators are emailed in order to approve the user's newly created account
    3. Administrators approve user's account - User is emailed and can now log in.

    It contains a new registration backend which has been tested with all the previous tests and some newly added to test the new functionality.

    For more information refer to the commit message. If the changes are not clear enough, I would be happy to provide documentation too. I have not done so yet as I would like some feedback first.

    I am available to answer any possible questions. Thank you.

    opened by safts 33
  • Add REGISTRATION_ADMINS mail setting for approval

    Add REGISTRATION_ADMINS mail setting for approval

    Checks for REGISTRATION_ADMINS defined in settings to use for the approval email instead of ADMINS. Triggers warning (about using ADMINS) if setting is not found

    opened by ioparaskev 17
  • Can't override email template as Django returns original as first match

    Can't override email template as Django returns original as first match

    After upgrading from old django-registration to redux version my email template rendering blow up.

    When I use django: loader.select_template(['registration/activation_email.txt']) I get the django-registration original template (while my overriden template is in my_app/templates/registration/activation_email.txt). The my_app/templates is discovered by AppDirectory template loader, it's on the django.template.loaders.app_directories.app_template_dirs folders list, but after "registration" app templates folder (as it's after "registration" on the INSTALLED_APPS lists).

    select_template calls get_template which returns first match. For some reason it worked before, but now (Django 1.7.7 and @master django-registration-redux) it does not. I can hack it by providing dirs value (either filtered or reversed):

        from django.template.loaders.app_directories import app_template_dirs
        dirs = sorted(app_template_dirs, reverse=True)
        template = loader.select_template(['registration/activation_email.txt'], dirs=dirs)
    

    But it would be good to know why and what is going on. It should "just work".

    opened by riklaunim 16
  • Documentation Installation

    Documentation Installation

    Documentation refer to installing https://django-registration.readthedocs.org/en/latest/quickstart.html

    Using pip, type:

    pip install django-registration
    

    This is the original ubernostrum/django-registration, so this could be very confusing.

    What about renaming your package? django-registration-ng or django-registration-macropin ?

    opened by areski 16
  • Prevent leaking password reset token through Referrer header

    Prevent leaking password reset token through Referrer header

    Addresses #266, preventing the leaking of password reset token through the Referrer header.

    For Django 1.11+, we fix by using the newer class based views.

    For versions of Django below 1.11 we add a meta block to the template add at the meta tag <meta name="referrer" content="never">. In addition, we add rel="noreferrer" to the password reset email.

    opened by joshblum 15
  • Add support for Django 1.11

    Add support for Django 1.11

    If I include urls with namespace

        url(r'^accounts/', include('registration.backends.simple.urls', namespace='registration')),
    

    And use it like this in template

    <li><a href="{% url 'registration:auth_login' %}">Login</a></li>
    

    then it is not working in latest Django.

    opened by nagracks 15
  • RequestSite issue in admin.py and default/views.py

    RequestSite issue in admin.py and default/views.py

    Just a heads up - (if not already fixed) but RequestSite is no longer in django.contrib.sites.models but is in django.contrib.sites.requests. I found that when I installed django-registration-redux, those old import statements are still there and I had to change them. If they are not changed, django throws import errors.

    Thanks, @nnamdiee

    opened by ghost 15
  • not being able to define per site email address

    not being able to define per site email address

    Since it is already possible to use site for email notifications it would be great if it could be possible to override settings.DEFAULT_FROM_ADDRESS from function

    enhancement 
    opened by sircco 15
  • Register user with form's save method, whenever possible

    Register user with form's save method, whenever possible

    Hey,

    In a nutshell, as I added to the CHANGELOG:

    • Feature: Added settings' options that allows to exlude the default auth urls (INCLUDE_AUTH_URLS) and register url (INCLUDE_REGISTER_URL).
    • Feature: Added support to dynamically import any chosen registration form using the settings option REGISTRATION_FORM.
    • Enhancement: Make RegistrationForm a subclass of Django's UserCreationForm
    • Enhancement: Use registration form save method to create user instance, whenever form is a subclass of Django's ModelForm.

    Basically I wanted to use your useful app in a project I'm working on, but with a few twists:

    • I didn't want to use the register/ url, because I have two distinct profiles each one with a different register form and view.
    • I wanted to use a registration form of my own, which is a subclass of ModelForm, with logic in the save method, associated with a custom user with no username field.

    I've run the tests and everything is working. I've also updated the docs, version number and changelog.

    Hope you approve my work. If you have any doubt, please contact me and I'll try to explain things better.

    DLM

    opened by laginha 14
  • Using Two Factor authentication with registration module

    Using Two Factor authentication with registration module

    Hi,

    I am not sure where to ask this, but I can't find anything on the internet. Did any of you had to use a two factor authentication with the registration module ? If yes, can you point me to some documentation or give me some info ?

    Thanks a lot

    opened by maxcanada 13
  • Reverse for 'registration_activate' not found

    Reverse for 'registration_activate' not found

    I have the following settings -

    REGISTRATION_OPEN = True # If True, users can register

    ACCOUNT_ACTIVATION_DAYS = 7 # One-week activation window; you may, of course, use a different value.

    REGISTRATION_AUTO_LOGIN = True # If True, the user will be automatically logged in.

    LOGIN_REDIRECT_URL = '/' # The page you want users to arrive at after they successful log in

    LOGIN_URL = '/accounts/login/' # The page users are directed to if they are not logged in, and are trying to access pages requiring authentication

    INCLUDE_REGISTER_URL = True

    And the following in the URLS -

    ... url(r'accounts/register/', BaseRegisterView.as_view(), name='registration_register'), (r'^accounts/', include('registration.backends.simple.urls')), ...

    Following error -

    Reverse for 'registration_activate' with arguments '('c6ae1dfec24759f7cd8013462c7240f0f21440aa',)'     and keyword arguments '{}' not found. 0 pattern(s) tried: []
    
    Error during template rendering
    
    In template /Users/Saket/.virtualenvs/oss/lib/python2.7/site-  packages/registration/templates/registration/activation_email.txt, error at line 13
    
    Reverse for 'registration_activate' with arguments '('c6ae1dfec24759f7cd8013462c7240f0f21440aa',)' and keyword arguments '{}' not found. 0 pattern(s) tried: []
    3   {% blocktrans with site_name=site.name %}
    4   You (or someone pretending to be you) have asked to register an account at
    5   {{ site_name }}.  If this wasn't you, please ignore this email
    6   and your address will be removed from our records.
    7   {% endblocktrans %}
    8   {% blocktrans %}
    9   To activate this account, please click the following link within the next
    
     10 {{ expiration_days }} days:
     11 {% endblocktrans %}
    
          http://{{site.domain}}
          {% url 'registration_activate' activation_key %}
    
    opened by codecraf8 13
  • show a form error when the user name or email has an illegal character

    show a form error when the user name or email has an illegal character

    Hi, forgive me if I'm not following the process. I'm new to github. This small change avoids a server hiccup is a user's name or email contains an illegal character (according to your DB).

    opened by jmordkoff 0
  • activate_user should send the user_activated signal

    activate_user should send the user_activated signal

    Shouldn't the registration.models.RegistrationManager.activate_user send the user_activated signal? It would sure be helpful when writing my own unit tests...

    Another think you might want to do is trigger a push to a contact management system (mailchimp, sendgrid or stripe for example) when a user is activated through the admin approval backend.

    opened by w00kie 1
  • Specified app_label to prevent issues with app_label when inheriting …

    Specified app_label to prevent issues with app_label when inheriting …

    Using the Registration package prompts app_label issue when migrating from Django 1.8 to 1.11. The specific reason for this was that because of a custom user model which inherited from registration model. Hence this fix is to prevent such errors.

    opened by msert29 4
  • discuss and document the future of django-registration

    discuss and document the future of django-registration

    The maintainers of this project have discussed its future and agree that, in general, django-allauth is a better solution to Django User registration for those looking to adopt something.

    However, we do not intend to stop maintaining this project. Our current goal is to continue supporting bug fixes, security fixes, enhancements, and new work from contributors, but to strongly suggest new adopters to look at django-allauth.

    This is related to #181

    help wanted 
    opened by dicato 6
  • add migration steps and documentation to move to django-allauth

    add migration steps and documentation to move to django-allauth

    django-allauth provides a more comprehensive solution to User registration and authentication than this project. Given the complexity of integrating different registration, authentication (two-factor, social auth, etc) with User management it generally makes sense to adopt one complete solution instead of combining many disparate solutions.

    Ideally, django-registration should provide both code and documentation to move a Django project to django-allauth in a tested, repeatable way.

    help wanted 
    opened by dicato 0
Releases(v2.11)
Authentication for Django Rest Framework

Dj-Rest-Auth Drop-in API endpoints for handling authentication securely in Django Rest Framework. Works especially well with SPAs (e.g React, Vue, Ang

Michael 1.1k Jan 03, 2023
Implementation of Supervised Contrastive Learning with AMP, EMA, SWA, and many other tricks

SupCon-Framework The repo is an implementation of Supervised Contrastive Learning. It's based on another implementation, but with several differencies

Ivan Panshin 132 Dec 14, 2022
Easy and secure implementation of Azure AD for your FastAPI APIs 🔒 Single- and multi-tenant support.

Easy and secure implementation of Azure AD for your FastAPI APIs 🔒 Single- and multi-tenant support.

Intility 220 Jan 05, 2023
Provide OAuth2 access to your app

django-oml Welcome to the documentation for django-oml! OML means Object Moderation Layer, the idea is to have a mixin model that allows you to modera

Caffeinehit 334 Jul 27, 2022
This python package provides a simple password reset strategy for django rest framework

Django Rest Password Reset This python package provides a simple password reset strategy for django rest framework, where users can request password r

Anexia 363 Dec 24, 2022
Pingo provides a uniform API to program devices like the Raspberry Pi, BeagleBone Black, pcDuino etc.

Pingo provides a uniform API to program devices like the Raspberry Pi, BeagleBone Black, pcDuino etc. just like the Python DBAPI provides an uniform API for database programming in Python.

Garoa Hacker Clube 12 May 22, 2022
Django-react-firebase-auth - A web app showcasing OAuth2.0 + OpenID Connect using Firebase, Django-Rest-Framework and React

Demo app to show Django Rest Framework working with Firebase for authentication

Teshank Raut 6 Oct 13, 2022
Integrated set of Django applications addressing authentication, registration, account management as well as 3rd party (social) account authentication.

Welcome to django-allauth! Integrated set of Django applications addressing authentication, registration, account management as well as 3rd party (soc

Raymond Penners 7.7k Jan 03, 2023
A secure authentication module to validate user credentials in a Streamlit application.

Streamlit-Authenticator A secure authentication module to validate user credentials in a Streamlit application. Installation Streamlit-Authenticator i

M Khorasani 336 Dec 31, 2022
Automatic login utility of free Wi-Fi captive portals

wicafe Automatic login utility of free Wi-Fi captive portals Disclaimer: read and grant the Terms of Service of Wi-Fi services before using it! This u

Takumi Sueda 8 May 31, 2022
Basic auth for Django.

Basic auth for Django.

bichanna 2 Mar 25, 2022
Luca Security Concept

Luca Security Concept This is the document source of luca's security concept. Please go here for the HTML version: https://luca-app.de/securityconcept

luca 43 Oct 22, 2022
A Python library to create and validate authentication tokens

handshake A Python library to create and validate authentication tokens. handshake is used to generate and validate arbitrary authentication tokens th

0 Apr 26, 2022
A wagtail plugin to replace the login by an OAuth2.0 Authorization Server

Wagtail OAuth2.0 Login Plugin to replace Wagtail default login by an OAuth2.0 Authorization Server. What is wagtail-oauth2 OAuth2.0 is an authorizatio

Gandi 7 Oct 07, 2022
Django Rest Framework App wih JWT Authentication and other DRF stuff

Django Queries App with JWT authentication, Class Based Views, Serializers, Swagger UI, CI/CD and other cool DRF stuff API Documentaion /swagger - Swa

Rafael Salimov 4 Jan 29, 2022
User Authentication in Flask using Flask-Login

User-Authentication-in-Flask Set up & Installation. 1 .Clone/Fork the git repo and create an environment Windows git clone https://github.com/Dev-Elie

ONDIEK ELIJAH OCHIENG 31 Dec 11, 2022
Mock authentication API that acceccpts email and password and returns authentication result.

Mock authentication API that acceccpts email and password and returns authentication result.

Herman Shpryhau 1 Feb 11, 2022
A generic, spec-compliant, thorough implementation of the OAuth request-signing logic

OAuthLib - Python Framework for OAuth1 & OAuth2 *A generic, spec-compliant, thorough implementation of the OAuth request-signing logic for Python 3.5+

OAuthlib 2.5k Jan 01, 2023
row level security for FastAPI framework

Row Level Permissions for FastAPI While trying out the excellent FastApi framework there was one peace missing for me: an easy, declarative way to def

Holger Frey 315 Dec 25, 2022
Awesome Django authorization, without the database

rules rules is a tiny but powerful app providing object-level permissions to Django, without requiring a database. At its core, it is a generic framew

1.6k Dec 30, 2022