Fix path in fnpdjango.
[fnp-django-template.git] / src / src / project_name / urls.py
1 from django.conf.urls import include, url
2 from django.conf import settings
3 from django.contrib import admin
4 import django_cas_ng.views
5
6 urlpatterns = [
7     # Examples:
8     # url(r'^$', {{ project_name }}.views.home, name='home'),
9     # url(r'^{{ project_name }}/', include('foo.urls')),
10
11     # Admin stuff.
12     url(r'^admin/', include(admin.site.urls)),
13
14     # CAS stuff.
15     url(r'^accounts/login/$', django_cas_ng.views.login),
16     url(r'^accounts/logout/$', django_cas_ng.views.logout),
17 ]
18
19 # Media in DEBUG mode
20 if settings.DEBUG:
21     from django.views.static import serve
22     urlpatterns += [
23         url(r'^media/(?P<path>.*)$', serve, {
24             'document_root': settings.MEDIA_ROOT,
25             'show_indexes': True,
26         }),
27    ]
28