The “simple” (one-step) backend¶
As an alternative to the default backend, and
an example of writing registration backends,
django-registration bundles a one-step registration system in
registration.backend.simple. This backend’s workflow is
deliberately as simple 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 backend, simply include the URLconf
registration.backends.simple.urls somewhere in your site’s own URL
configuration. For example:
No additional settings are required, but one optional setting is supported:
- A boolean (either
False) indicating whether registration of new accounts is currently permitted. A default of
Truewill be assumed if this setting is not supplied.
Upon successful registration, the default redirect is to the URL
specified by the
get_absolute_url() method of the newly-created
User object; by default, this will be
although it can be overridden in either of two ways:
- Specify a custom URL pattern for the
register()view, passing the keyword argument
- Override the default
Usermodel in your Django configuration, as covered in Django’s settings documentation.
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
view and passing the keyword argument
Note that because this backend does not use an activation step,
attempting to use the
activate() view with
this backend or calling the backend’s
post_activation_redirect() methods will raise