Skip to main content

Override Django-registration to log in by e-mail

Project description

Override django-registration-redux to log-in by e-mail. This package provides:

  • Log-in with e-mail or username

  • User-convenient messages for various cases in login and password reset form

  • Send password reset e-mail even for users without password

  • Includes phishing-safe next_url mechanism

Security note: For better user experience the password reset form informs users if the e-mail doesn’t exist in the system. This lowers security, because attacker can query the system whether the account exists or not. The risk is lowered by using captcha on the form, but still you should evaluate if this is secure enough for your system.


The full documentation is at


Install Django registration with email:

pip install django-registration-redux
pip install django-registration-with-email

Add it to your INSTALLED_APPS:


Add Django registration with email’s URL patterns:

urlpatterns = [
    path('accounts/', include('django_registration_with_email.urls')),
    path('accounts/', include('registration.backends.default.urls')),

Set email as unique=True in your User model:

class User(TimeStampedModel, AbstractUser):
   email = models.EmailField(
     verbose_name='email address',


  • TODO

Running Tests

Does the code actually work?

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox

Development commands

pip install -r requirements_dev.txt
invoke -l


Tools used in rendering this package:


0.2.0 (2021-04-05)

  • Use django-registration-redux

0.1.0 (2021-03-01)

  • First release on PyPI.

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

django-registration-with-email-0.3.1.tar.gz (19.0 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page