comparison accounts/urls.py @ 581:ee87ea74d46b

For Django 1.4, rearranged project structure for new manage.py.
author Brian Neal <bgneal@gmail.com>
date Sat, 05 May 2012 17:10:48 -0500
parents gpp/accounts/urls.py@ddd69a8e07c7
children 8e6b8ffe5f34
comparison
equal deleted inserted replaced
580:c525f3e0b5d0 581:ee87ea74d46b
1 """urls for the accounts application"""
2 from django.conf.urls import patterns, url
3 from django.conf import settings
4
5 urlpatterns = patterns('accounts.views',
6 url(r'^login/ajax/$', 'login_ajax', name='accounts-login_ajax'),
7 url(r'^register/$', 'register', name='accounts-register'),
8 (r'^register/thanks/$', 'register_thanks'),
9 (r'^register/confirm/(?P<username>[\w.@+-]{1,30})/(?P<key>[a-zA-Z0-9]{20})/$', 'register_confirm'),
10 )
11
12 urlpatterns += patterns('',
13 url(r'^login/$',
14 'django.contrib.auth.views.login',
15 kwargs={'template_name': 'accounts/login.html'},
16 name='accounts-login'),
17 url(r'^logout/$',
18 'django.contrib.auth.views.logout',
19 kwargs={'template_name': 'accounts/logout.html'},
20 name='accounts-logout'),
21 (r'^password/$',
22 'django.contrib.auth.views.password_change',
23 {'template_name': 'accounts/password_change.html',
24 'post_change_redirect': settings.LOGIN_REDIRECT_URL}),
25 url(r'^password/reset/$',
26 'django.contrib.auth.views.password_reset',
27 kwargs={'template_name': 'accounts/password_reset.html',
28 'email_template_name': 'accounts/password_reset_email.txt',
29 'post_reset_redirect': '/accounts/password/reset/sent/'},
30 name='accounts-password_reset'),
31 url(r'^password/reset/sent/$',
32 'django.contrib.auth.views.password_reset_done',
33 kwargs={'template_name': 'accounts/password_reset_sent.html'},
34 name='accounts-password_reset_sent'),
35 url(r'^password/reset/confirm/(?P<uidb36>[0-9a-z]+)/(?P<token>[0-9a-z]+-\w+)/$',
36 'django.contrib.auth.views.password_reset_confirm',
37 kwargs={
38 'template_name': 'accounts/password_reset_confirm.html',
39 'post_reset_redirect': '/accounts/password/reset/success/',
40 },
41 name='accounts-password_reset_confirm'),
42 url(r'^password/reset/success/$',
43 'django.contrib.auth.views.password_reset_complete',
44 kwargs={'template_name': 'accounts/password_reset_complete.html'},
45 name='accounts-password_reset_success'),
46 )
47