Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #6581 -- Moved documentation of django.contrib.auth.views.redir…

…ect_to_login to an own "Helper functions" section.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16130 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 13b4f98b8088cdf66c616625483dee5d1a302c0a 1 parent 2830872
Jannis Leidel authored April 30, 2011

Showing 1 changed file with 23 additions and 19 deletions. Show diff stats Hide diff stats

  1. 42  docs/topics/auth.txt
42  docs/topics/auth.txt
@@ -991,25 +991,6 @@ includes a few other useful built-in views located in
991 991
           default to :file:`registration/password_reset_done.html` if not
992 992
           supplied.
993 993
 
994  
-.. function:: redirect_to_login(next[, login_url, redirect_field_name])
995  
-
996  
-    Redirects to the login page, and then back to another URL after a
997  
-    successful login.
998  
-
999  
-    **Required arguments:**
1000  
-
1001  
-        * ``next``: The URL to redirect to after a successful login.
1002  
-
1003  
-    **Optional arguments:**
1004  
-
1005  
-        * ``login_url``: The URL of the login page to redirect to. This will
1006  
-          default to :setting:`settings.LOGIN_URL <LOGIN_URL>` if not supplied.
1007  
-
1008  
-        * ``redirect_field_name``: The name of a ``GET`` field containing the
1009  
-          URL to redirect to after log out. Overrides ``next`` if the given
1010  
-          ``GET`` parameter is passed.
1011  
-
1012  
-
1013 994
 .. function:: password_reset_confirm(request[, uidb36, token, template_name, token_generator, set_password_form, post_reset_redirect])
1014 995
 
1015 996
     Presents a form for entering a new password.
@@ -1039,6 +1020,29 @@ includes a few other useful built-in views located in
1039 1020
        * ``template_name``: The full name of a template to display the view.
1040 1021
          This will default to :file:`registration/password_reset_complete.html`.
1041 1022
 
  1023
+Helper functions
  1024
+----------------
  1025
+
  1026
+.. module:: django.contrib.auth.views
  1027
+
  1028
+.. function:: redirect_to_login(next[, login_url, redirect_field_name])
  1029
+
  1030
+    Redirects to the login page, and then back to another URL after a
  1031
+    successful login.
  1032
+
  1033
+    **Required arguments:**
  1034
+
  1035
+        * ``next``: The URL to redirect to after a successful login.
  1036
+
  1037
+    **Optional arguments:**
  1038
+
  1039
+        * ``login_url``: The URL of the login page to redirect to. This will
  1040
+          default to :setting:`settings.LOGIN_URL <LOGIN_URL>` if not supplied.
  1041
+
  1042
+        * ``redirect_field_name``: The name of a ``GET`` field containing the
  1043
+          URL to redirect to after log out. Overrides ``next`` if the given
  1044
+          ``GET`` parameter is passed.
  1045
+
1042 1046
 Built-in forms
1043 1047
 --------------
1044 1048
 

0 notes on commit 13b4f98

Please sign in to comment.
Something went wrong with that request. Please try again.