Registry / web-framework / django-registration

django-registration

JSON →
library5.2.1pypypiunverified

Django Registration (django-registration) is an extensible application that provides user registration functionality for Django websites. It supports common registration workflows, including two-step (email activation) and one-step (immediate login), and is designed to work with both Django's default and custom user models. Currently at version 5.2.1, it follows a 'DjangoVer' versioning scheme, ensuring compatibility with supported Django feature releases.

pip install django-registration
INSTALL
IMPORT
SIG · DJANGO-REGISTRATIO
D
django-registration
web-frameworkpythonv5.2.1
Install
3.5s avg
Import
Disk
67MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v5.2.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.915 runs
installs and imports cleanly · install 0.0s · import 0.000s · 68MB
glibc
py 3.103.915 runs
installs and imports cleanly · install 3.5s · import 0.000s · 68MB
67MB installed
● package 67MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

RegistrationForm
from django_registration.forms import RegistrationForm
from django_registration.forms import RegistrationForm

To quickly set up `django-registration`, add `django_registration` to your `INSTALLED_APPS`. For the two-step activation workflow, define `ACCOUNT_ACTIVATION_DAYS` in your `settings.py`. Then, include the appropriate URL patterns in your project's `urls.py` (e.g., `django_registration.backends.one_step.urls` or `django_registration.backends.activation.urls`), typically under an `/accounts/` prefix, alongside Django's built-in `django.contrib.auth.urls`. Ensure `django.contrib.sites` is also installed and `SITE_ID` is configured.

import os # settings.py INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.sites', 'django_registration', # 'django_registration.backends.activation', # Optional, explicitly if only using activation backend # 'django_registration.backends.one_step', # Optional, explicitly if only using one-step backend ] SITE_ID = 1 # Required by django.contrib.sites, which django-registration uses. ACCOUNT_ACTIVATION_DAYS = 7 # Required for the two-step activation workflow. # Configure email backend for activation (example using console) EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' # Optionally, redirect after login (Django's built-in auth uses this) LOGIN_REDIRECT_URL = '/' LOGOUT_REDIRECT_URL = '/' # urls.py from django.urls import include, path urlpatterns = [ path('admin/', include('admin.site.urls')), path('accounts/', include('django_registration.backends.one_step.urls')), # For one-step registration path('accounts/', include('django.contrib.auth.urls')), # For login, logout, password reset etc. ] # Remember to run migrations: python manage.py migrate
Debug
Known issues
breakingVersion 5.1.0 significantly refactored `RegistrationForm` (no longer subclassing Django's `UserCreationForm`) and `ActivationView`. While designed for backwards compatibility, projects with highly customized forms or activation logic might require adjustments, especially when interacting with custom user models.
fix
Review the `RegistrationForm` and `ActivationView` documentation for version 5.1.0+ and test custom registration flows thoroughly. Custom forms might need to be re-evaluated for compatibility with the new base form structure.
affects: 5.1.0+
breakingOlder versions (pre-3.0) dropped Python 2 and Django 1.11 support. The current 5.x series requires Python >=3.9 and supports Django 4.2, 5.0, 5.1, and 5.2. Ensure your Python and Django versions meet these requirements before upgrading `django-registration`.
fix
Upgrade your Django project to a supported version (e.g., Django 4.2 LTS or 5.x) and ensure your Python environment is 3.9 or higher before installing `django-registration` 5.x.
affects: <3.0, <5.1.0 (for older Django versions)
gotchaFor templates to render correctly, `django_registration` (or `registration` in older versions) should be listed *above* `django.contrib.admin` in your `INSTALLED_APPS` setting.
fix
Adjust `INSTALLED_APPS` order in `settings.py`: `INSTALLED_APPS = ['...', 'django_registration', 'django.contrib.admin', '...']`
affects: All versions
gotchaVersion 2.1 introduced `ReservedNameValidator`, which prevents registration of certain usernames (e.g., 'admin', 'root'). This validator is applied by default. Similarly, `HTML5EmailValidator` was added in 5.0.0, which is more restrictive for email addresses.
fix
If you need to allow usernames/email addresses that conflict with these validators, consult the `django-registration` documentation on form customization or disabling specific validators. For example, you can replace the default `RegistrationForm` with a custom one that omits or modifies these validators.
affects: 2.1+, 5.0.0+
Upgrade
Version history
5.2.1latest on PyPI · released Apr 7, 2025
Audit
Dependencies
DjangorequiredCore framework dependency. Requires Django >=3.9, officially supports 4.2, 5.0, 5.1, 5.2 for version 5.x.
Agent activity
33 hits · last 30 days
node
30
OpenAI (training)
1
Resources
django-registration — pip install django-registration · libregistry