Commits

James Bennett committed 0b85c90

Some more Sphinx-ification of documentation.

Comments (0)

Files changed (2)

docs/default-backend.rst

          value of the setting ``ACCOUNT_ACTIVATION_DAYS``, the key is
          considered to have expired.
 
+      :rtype: bool
+
    .. method:: send_activation_email(site)
 
       Sends an activation email to the address of the account.
       will be forcibly condensed to a single line.
 
       :param site: An object representing the site on which account
-         was registered; an instance of either
-         ``django.contrib.sites.models.Site`` or
-         ``django.contrib.sites.models.RequestSite``.
+         was registered.
+      :type site: ``django.contrib.sites.models.Site`` or
+        ``django.contrib.sites.models.RequestSite``
+      :rtype: ``None``
 
 
 Additionally, :class:`RegistrationProfile` has a custom manager
       activation is successful, ``False`` otherwise.
 
       :param activation_key: The activation key to use for the
-         activation (a SHA1 hash as a forty-character hexadecimal
-         digest).
+         activation.
+      :type activation_key: string, a 40-character SHA1 hexdigest
+      :rtype: ``User`` or bool
 
    .. method:: delete_expired_users
 
       method, suitable for use in cron jobs or other scheduled
       maintenance tasks: ``manage.py cleanupregistration``.
 
+      :rtype: ``None``
+
    .. method:: create_inactive_user(username, email, password, site[, send_email])
 
       Creates a new, inactive user account and an associated instance
       returns the new ``User`` object representing the account.
 
       :param username: The username to use for the new account.
+      :type username: string
       :param email: The email address to use for the new account.
+      :type email: string
       :param password: The password to use for the new account.
+      :type password: string
       :param site: An object representing the site on which the
-         account is being registered; an instance of either
-         ``django.contrib.sites.models.Site`` or
-         ``django.contrib.sites.models.RequestSite``.
+         account is being registered.
+      :type site: ``django.contrib.sites.models.Site`` or
+         ``django.contrib.sites.models.RequestSite``
       :param send_email: If ``True``, the activation email will be
          sent to the account (by calling
          :meth:`RegistrationProfile.send_activation_email`). If
          ``False``, no email will be sent (but the account will still
          be inactive)
+      :type send_email: bool
+      :rtype: ``User``
 
    .. method:: create_profile(user)
 
 
       :param user: The user account; an instance of
          ``django.contrib.auth.models.User``.
+      :type user: ``User``
+      :rtype: ``RegistrationProfile``
    populated by context processors will also be present in the
    context.
 
-   :param backend: A string containing the dotted Python path to the
-      backend class to use.
-   :param extra_context: Optional. A dictionary of variables to add to
-      the template context. Any callable object in this dictionary
-      will be called to produce the final result which appears in the
-      context.
+   :param backend: The dotted Python path to the backend class to use.
+   :type backend: string
+   :param extra_context: Optionally, variables to add to the template
+      context. Any callable object in this dictionary will be called
+      to produce the final result which appears in the context.
+   :type extra_context: dict
    :param template_name: Optional. A custom template name to use. If
       not specified, this will default to
       ``registration/activate.html``.
+   :type template_name: string
    :param **kwargs: Any keyword arguments captured from the URL, such
       as an activation key, which will be passed to the backend's
       ``activate()`` method.
    This view uses ``RequestContext``, so variables populated by
    context processors will also be present in the context.
 
-   :param backend: A string containing the dotted Python path to the
-      backend class to use.
+   :param backend: The dotted Python path to the backend class to use.
+   :type backend: string
    :param disallowed_url: The URL to redirect to if registration is
       not permitted (e.g., if registration is closed). This should be
       a string suitable for passing as the ``to`` argument to
       `Django's "redirect" shortcut
       <http://docs.djangoproject.com/en/dev/topics/http/shortcuts/#redirect>`_. If
       not specified, this will default to ``registration_disallowed``.
-   :param extra_context: Optional. A dictionary of variables to add to
-      the template context. Any callable object in this dictionary
-      will be called to produce the final result which appears in the
-      context.
-   :param form_classs: The form class to use for registration; this
+   :type disallowed_url: string
+   :param extra_context: Optionally, variables to add to the template
+      context. Any callable object in this dictionary will be called
+      to produce the final result which appears in the context.
+   :type extra_context: dict
+   :param form_class: The form class to use for registration; this
       should be some subclass of ``django.forms.Form``. If not
       specified, the backend's ``get_form_class()`` method will be
       called to obtain the form class.
+   :type form_class: subclass of ``django.forms.Form``
    :param success_url: The URL to redirect to after successful
       registration. This should be a string suitable for passing as
       the ``to`` argument to `Django's "redirect" shortcut
       <http://docs.djangoproject.com/en/dev/topics/http/shortcuts/#redirect>`_. If
       not specified, the backend's ``post_registration_redirect()``
       method will be called to obtain the URL.
+   :type success_url: string
    :param template_name: Optional. A custom template name to use. If
       not specified, this will default to
       ``registration/registration_form.html``.
+   :type template_name: string