Ticket #16789: t16789-with-docs.diff
File t16789-with-docs.diff, 5.1 KB (added by , 13 years ago) |
---|
-
django/contrib/auth/urls.py
diff --git a/django/contrib/auth/urls.py b/django/contrib/auth/urls.py index 42b4e8f..b32b796 100644
a b 1 # These URLs are normally mapped to /admin/urls.py. This URLs file is 2 # provided as a convenience to those who want to deploy these URLs elsewhere. 1 # This URLs file is provided as a convenience to those who want to deploy these URLs elsewhere. 3 2 # This file is also used to provide a reliable view deployment for test purposes. 4 3 5 from django.conf.urls.defaults import *4 from django.conf.urls.defaults import patterns, url 6 5 7 6 urlpatterns = patterns('', 8 (r'^login/$', 'django.contrib.auth.views.login'),9 (r'^logout/$', 'django.contrib.auth.views.logout'),10 (r'^password_change/$', 'django.contrib.auth.views.password_change'),11 (r'^password_change/done/$', 'django.contrib.auth.views.password_change_done'),12 (r'^password_reset/$', 'django.contrib.auth.views.password_reset'),13 (r'^password_reset/done/$', 'django.contrib.auth.views.password_reset_done'),14 (r'^reset/(?P<uidb36>[0-9A-Za-z]{1,13})-(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', 'django.contrib.auth.views.password_reset_confirm'),15 (r'^reset/done/$', 'django.contrib.auth.views.password_reset_complete'),7 url(r'^login/$', 'django.contrib.auth.views.login', name='login'), 8 url(r'^logout/$', 'django.contrib.auth.views.logout', name='logout'), 9 url(r'^password_change/$', 'django.contrib.auth.views.password_change', name='password_change'), 10 url(r'^password_change/done/$', 'django.contrib.auth.views.password_change_done', name='password_change_done'), 11 url(r'^password_reset/$', 'django.contrib.auth.views.password_reset', name='password_reset'), 12 url(r'^password_reset/done/$', 'django.contrib.auth.views.password_reset_done', name='password_reset_done'), 13 url(r'^reset/(?P<uidb36>[0-9A-Za-z]{1,13})-(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', 'django.contrib.auth.views.password_reset_confirm', name='password_reset_confirm'), 14 url(r'^reset/done/$', 'django.contrib.auth.views.password_reset_complete', name='password_reset_complete'), 16 15 ) 17 -
docs/topics/auth.txt
diff --git a/docs/topics/auth.txt b/docs/topics/auth.txt index 69f6fd7..08673fa 100644
a b The login_required decorator 823 823 824 824 .. function:: views.login(request, [template_name, redirect_field_name, authentication_form]) 825 825 826 **URL name:** ``login`` 827 828 See :doc:`the URL documentation </topics/http/urls>` for details on using named URL patterns 829 826 830 Here's what ``django.contrib.auth.views.login`` does: 827 831 828 832 * If called via ``GET``, it displays a login form that POSTs to the … … includes a few other useful built-in views located in 938 942 939 943 Logs a user out. 940 944 945 **URL name:** ``logout`` 946 947 See :doc:`the URL documentation </topics/http/urls>` for details on using named URL patterns 948 949 941 950 **Optional arguments:** 942 951 943 952 * ``next_page``: The URL to redirect to after logout. … … includes a few other useful built-in views located in 970 979 971 980 Logs a user out, then redirects to the login page. 972 981 982 **URL name:** No default URL provided 983 973 984 **Optional arguments:** 974 985 975 986 * ``login_url``: The URL of the login page to redirect to. … … includes a few other useful built-in views located in 979 990 980 991 Allows a user to change their password. 981 992 993 **URL name:** ``password_change`` 994 982 995 **Optional arguments:** 983 996 984 997 * ``template_name``: The full name of a template to use for … … includes a few other useful built-in views located in 1003 1016 1004 1017 The page shown after a user has changed their password. 1005 1018 1019 **URL name:** ``password_change_done`` 1020 1006 1021 **Optional arguments:** 1007 1022 1008 1023 * ``template_name``: The full name of a template to use. … … includes a few other useful built-in views located in 1024 1039 will not be able to request a password reset to prevent misuse 1025 1040 when using an external authentication source like LDAP. 1026 1041 1042 **URL name:** ``password_reset`` 1043 1027 1044 **Optional arguments:** 1028 1045 1029 1046 * ``template_name``: The full name of a template to use for … … includes a few other useful built-in views located in 1099 1116 password. This view is called by default if the :func:`password_reset` view 1100 1117 doesn't have an explicit ``post_reset_redirect`` URL set. 1101 1118 1119 **URL name:** ``password_reset_done`` 1120 1102 1121 **Optional arguments:** 1103 1122 1104 1123 * ``template_name``: The full name of a template to use. … … includes a few other useful built-in views located in 1109 1128 1110 1129 Presents a form for entering a new password. 1111 1130 1131 **URL name:** ``password_reset_confirm`` 1132 1112 1133 **Optional arguments:** 1113 1134 1114 1135 * ``uidb36``: The user's id encoded in base 36. Defaults to ``None``. … … includes a few other useful built-in views located in 1142 1163 Presents a view which informs the user that the password has been 1143 1164 successfully changed. 1144 1165 1166 **URL name:** ``password_reset_complete`` 1167 1145 1168 **Optional arguments:** 1146 1169 1147 1170 * ``template_name``: The full name of a template to display the view.