-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
urls.py
35 lines (28 loc) · 1.77 KB
/
urls.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from django.conf.urls.defaults import patterns, include, url
import django.views.generic.simple
import os.path
from django.contrib import auth
import django.contrib.auth.views
import vvs.zaalrooster.views
from vvs import zaalrooster
from vvs.settings import MEDIA_ROOT
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', zaalrooster.views.home, name='home'),
url(r'^(?P<year>\d{4})/(?P<month>\d{2})/$', zaalrooster.views.month_view, name='month-view'),
url(r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/inschrijven/$', zaalrooster.views.inschrijven, name='inschrijven'),
url(r'^((?P<year>\d{4})/(?P<month>\d{2})/((?P<day>\d{2})/)?|(?P<future>future/))?(?P<state>pending|approved|needsigning|confirmed|backup|denied|cancel_request|cancelled)/$', zaalrooster.views.list_view, name='list-view'),
url(r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/exception/add/$', zaalrooster.views.add_exception, name='add-exception'),
url(r'^set-state/$', zaalrooster.views.set_state, name='set-state'),
url(r'^accounts/login/$', auth.views.login, {'template_name': 'login.html'}, name='login'),
url(r'^accounts/logout/$', auth.views.logout_then_login, name='logout'),
url(r'^admin/password_reset/$', auth.views.password_reset, name='admin_password_reset'),
(r'^admin/password_reset/done/$', auth.views.password_reset_done),
(r'^reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$', auth.views.password_reset_confirm),
(r'^reset/done/$', auth.views.password_reset_complete),
url(r'^admin/', include(admin.site.urls)),
(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': MEDIA_ROOT}),
(r'^favicon.ico$', 'django.views.generic.simple.redirect_to', {'url': '/media/favicon.ico'}),
)