.. module:: registration.backends.simple
As an alternative to :ref:`the default backend <default-backend>`, and
an example of writing alternate workflows, |project| 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:
path('accounts/', include('registration.backends.simple.urls')),
No additional settings are required, but two optional settings are supported:
REGISTRATION_OPEN
- A boolean (either
True
orFalse
) indicating whether registration of new accounts is currently permitted. A default ofTrue
will be assumed if this setting is not supplied. SIMPLE_BACKEND_REDIRECT_URL
- Redirection url after successful registration.
Default value is
/
The default form class used for account registration will be
:class:`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
overriding form_class
or implementing
:meth:`~registration.views.RegistrationView.get_form_class()`.