In order to allow users to register using whatever workflow is implemented by the registration backend in use, django-registration provides two views. Both are designed to allow easy configurability without writing or rewriting view code.
Activate a user’s account, for workflows which require a separate activation step.
The actual activation of the account will be delegated to the backend specified by the backend keyword argument; the backend’s activate() method will be called, passing the HttpRequest and any keyword arguments captured from the URL, and will be assumed to return a User if activation was successful, or a value which evaluates to False in boolean context if not.
Upon successful activation, the backend’s post_activation_redirect() method will be called, passing the HttpRequest and the activated User to determine the URL to redirect the user to. To override this, pass the argument success_url (see below).
On unsuccessful activation, will render the template registration/activate.html to display an error message; to override thise, pass the argument template_name (see below).
Context
The context will be populated from the keyword arguments captured in the URL. This view uses RequestContext, so variables populated by context processors will also be present in the context.
Parameters: |
|
---|
Allow a new user to register an account.
The actual registration of the account will be delegated to the backend specified by the backend keyword argument. The backend is used as follows:
Context
This view uses RequestContext, so variables populated by context processors will also be present in the context.
Parameters: |
|
---|