Code

Ticket #16789: named_auth_urls_ticket16789.diff

File named_auth_urls_ticket16789.diff, 2.0 KB (added by wim@…, 3 years ago)

add names to auth/urls.py

Line 
1Index: django/contrib/auth/urls.py
2===================================================================
3--- django/contrib/auth/urls.py (revision 16741)
4+++ django/contrib/auth/urls.py (working copy)
5@@ -2,16 +2,16 @@
6 # provided as a convenience to those who want to deploy these URLs elsewhere.
7 # This file is also used to provide a reliable view deployment for test purposes.
8 
9-from django.conf.urls.defaults import *
10+from django.conf.urls.defaults import patterns, url
11 
12 urlpatterns = patterns('',
13-    (r'^login/$', 'django.contrib.auth.views.login'),
14-    (r'^logout/$', 'django.contrib.auth.views.logout'),
15-    (r'^password_change/$', 'django.contrib.auth.views.password_change'),
16-    (r'^password_change/done/$', 'django.contrib.auth.views.password_change_done'),
17-    (r'^password_reset/$', 'django.contrib.auth.views.password_reset'),
18-    (r'^password_reset/done/$', 'django.contrib.auth.views.password_reset_done'),
19-    (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'),
20-    (r'^reset/done/$', 'django.contrib.auth.views.password_reset_complete'),
21+    url(r'^login/$', 'django.contrib.auth.views.login', name='login'),
22+    url(r'^logout/$', 'django.contrib.auth.views.logout', name='logout'),
23+    url(r'^password_change/$', 'django.contrib.auth.views.password_change', name='password_change'),
24+    url(r'^password_change/done/$', 'django.contrib.auth.views.password_change_done', name='password_change_done'),
25+    url(r'^password_reset/$', 'django.contrib.auth.views.password_reset', name='password_reset'),
26+    url(r'^password_reset/done/$', 'django.contrib.auth.views.password_reset_done', name='password_reset_done'),
27+    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'),
28+    url(r'^reset/done/$', 'django.contrib.auth.views.password_reset_complete', name='password_reset_complete'),
29 )
30