James Bennett avatar James Bennett committed a704ae2

Documentation updates for the simple backend.

Comments (0)

Files changed (3)

 <quickstart>`, which describes all the necessary steps to install
 django-registration and configure it for the default workflow. For
 more detailed information, including how to customize the registration
-process (including support for alternate registration systems), read
-through the documentation listed below.
+process (and support for alternate registration systems), read through
+the documentation listed below.
 
 If you are upgrading from a previous release, please read the
 :ref:`upgrade guide <upgrade>` for information on what's changed.
    upgrade
    backend-api
    default-backend
+   simple-backend
    forms
    views
    signals
    faq
+
+.. seealso::
+
+   * `Django's authentication documentation
+     <http://docs.djangoproject.com/en/dev/topics/auth/>`_; Django's
+     authentication system is used by django-registration's default
+     configuration.
+
+   * `django-profiles
+     <http://bitbucket.org/ubernostrum/django-profiles/>`_, an
+     application which provides simple user-profile management.

docs/release-notes.rst

 Other new features
 ------------------
 
+An alternate :ref:`one-step registration system <simple-backend>` is
+provided, for use by sites which do not require a two-step
+registration/activation system.
+
 During the registration and (optional) activation process,
 :ref:`custom signals <signals>` are now sent, allowing easy injection
 of custom processing into the registration workflow without needing to

docs/simple-backend.rst

+.. _simple-backend:
+.. module:: registration.backends.simple
+
+The "simple" (one-step) backend
+===============================
+
+As an alternative to :ref:`the default backend <default-backend>`, and
+an example of writing :ref:`registration backends <backend-api>`,
+django-registration bundles a one-step registration system in
+``registration.backend.simple``. This backend's workflow is
+deliberately as simple as possible:
+
+1. A user signs up by filling out a registration form.
+
+2. The user's account is created and is active immediately, with no
+   intermediate confirmation or activation step.
+
+3. The new user is logged in immediately.
+
+
+Configuration
+-------------
+
+To use this backend, simply include the URLconf
+``registration.backends.simple.urls`` somewhere in your site's own URL
+configuration. For example::
+
+    (r'^accounts/', include('registration.backends.simple.urls')),
+
+No additional settings are required, but one optional setting is
+supported:
+
+``REGISTRATION_OPEN``
+    A boolean (either ``True`` or ``False``) indicating whether
+    registration of new accounts is currently permitted. A default of
+    ``True`` will 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 ``/users/<username>/``,
+although it can be overridden in either of two ways:
+
+1. Specify a custom URL pattern for the
+   :func:`~registration.views.register` view, passing the keyword
+   argument ``success_url``.
+
+2. Override the default ``get_absolute_url()`` of the ``User`` model
+   in your Django configuration, as covered in `Django's settings
+   documentation
+   <http://docs.djangoproject.com/en/dev/ref/settings/#absolute-url-overrides>`_.
+
+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 ``register()``
+view and passing the keyword argument ``form_class``.
+
+Note that because this backend does not use an activation step,
+attempting to use the :func:`~registration.views.activate` view with
+this backend or calling the backend's ``activate()`` or
+``post_activation_redirect()`` methods will raise
+``NotImplementedError``.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.