9b91a7b8bab72b72abbc38ff893b74dc6f3683ec
[auf_paf.git] / paf0 / urls.py
1 from django.conf.urls import patterns, include, url
2 from django.conf import settings
3 from paf.views import password_change, password_change_done, admin_home
4 from django.http import HttpResponseRedirect
5
6 # Uncomment the next two lines to enable the admin:
7 from django.contrib import admin
8 admin.autodiscover()
9
10 urlpatterns = patterns('',
11 # Examples:
12 # url(r'^$', 'paf0.views.home', name='home'),
13 # url(r'^paf0/', include('paf0.foo.urls')),
14
15 # Uncomment the admin/doc line below to enable admin documentation:
16 # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
17
18 url(r'^$', 'paf0.views.home', name='home'),
19 url(r'^connexion/$', 'django.contrib.auth.views.login', dict(
20 template_name='connexion.html',
21 ), 'connexion'),
22 url(r'^deconnexion/$', 'django.contrib.auth.views.logout', dict(
23 template_name='deconnexion.html',
24 ), 'deconnexion'),
25 url(r'^change_password/$', password_change, name='change_password'),
26 url(r'^change_password/done/$', password_change_done, name='change_password_done'),
27 url(r'^admin/password_change/done/$', lambda x: HttpResponseRedirect('/change_password/done/')),
28 url(r'^admin/$', admin_home, name='admin_home'),
29
30 #url(r'^admin/paf/student/(\d+)/', 'paf.views.change_student', name='test_change_student'),
31
32 # Uncomment the next line to enable the admin:
33 url(r'^admin/', include(admin.site.urls)),
34
35 #paf
36 url(r'^paf/', include('paf.urls')),
37
38 )
39
40 if settings.DEBUG:
41 urlpatterns += patterns('',
42 (r'^media/(?P<path>.*)$', 'django.views.static.serve',
43 {'document_root': settings.MEDIA_ROOT}),
44 )
45
46 urlpatterns += patterns('',
47 url(r'^captcha/', include('captcha.urls')),
48 )
49
50 urlpatterns += patterns('',
51 url(r'^chaining/', include('smart_selects.urls')),
52 )