Fixed #6581 -- Moved documentation of django.contrib.auth.views.redirect_to_login to an own "Helper functions" section.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16130 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jannis Leidel 2011-04-30 13:37:03 +00:00
parent 2830872d60
commit 13b4f98b80
1 changed files with 23 additions and 19 deletions

View File

@ -991,25 +991,6 @@ includes a few other useful built-in views located in
default to :file:`registration/password_reset_done.html` if not
supplied.
.. function:: redirect_to_login(next[, login_url, redirect_field_name])
Redirects to the login page, and then back to another URL after a
successful login.
**Required arguments:**
* ``next``: The URL to redirect to after a successful login.
**Optional arguments:**
* ``login_url``: The URL of the login page to redirect to. This will
default to :setting:`settings.LOGIN_URL <LOGIN_URL>` if not supplied.
* ``redirect_field_name``: The name of a ``GET`` field containing the
URL to redirect to after log out. Overrides ``next`` if the given
``GET`` parameter is passed.
.. function:: password_reset_confirm(request[, uidb36, token, template_name, token_generator, set_password_form, post_reset_redirect])
Presents a form for entering a new password.
@ -1039,6 +1020,29 @@ includes a few other useful built-in views located in
* ``template_name``: The full name of a template to display the view.
This will default to :file:`registration/password_reset_complete.html`.
Helper functions
----------------
.. module:: django.contrib.auth.views
.. function:: redirect_to_login(next[, login_url, redirect_field_name])
Redirects to the login page, and then back to another URL after a
successful login.
**Required arguments:**
* ``next``: The URL to redirect to after a successful login.
**Optional arguments:**
* ``login_url``: The URL of the login page to redirect to. This will
default to :setting:`settings.LOGIN_URL <LOGIN_URL>` if not supplied.
* ``redirect_field_name``: The name of a ``GET`` field containing the
URL to redirect to after log out. Overrides ``next`` if the given
``GET`` parameter is passed.
Built-in forms
--------------