The one-step workflow¶
As an alternative to the HMAC and
model-based two-step (registration and
activation) workflows, django-registration bundles a one-step
registration workflow in
workflow consists of as few steps as possible:
- A user signs up by filling out a registration form.
- The user’s account is created and is active immediately, with no intermediate confirmation or activation step.
- The new user is logged in immediately.
To use this workflow, include the URLconf
registration.backends.simple.urls somewhere in your site’s own URL
configuration. For example:
from django.conf.urls import include, url urlpatterns = [ # Other URL patterns ... url(r'^accounts/', include('registration.backends.simple.urls')), # More URL patterns ... ]
To control whether registration of new accounts is allowed, you can
specify the setting
Upon successful registration, the user will be redirected to the
site’s home page – the URL
/. This can be changed by subclassing
registration.backends.simple.views.RegistrationView and overriding
The default form class used for account registration will be
registration.forms.RegistrationForm, although this can be
overridden by supplying a custom URL pattern for the registration view
and passing the keyword argument
form_class, or by subclassing
registration.backends.simple.views.RegistrationView and either
form_class or implementing
specifying the custom subclass in your URL patterns.
The one-step workflow uses only one custom template:
Used to show the form users will fill out to register. By default, has the following context: