5b67eb1762a9f88d7eb5f89893d70657aa699df9
[cas.git] / src / cas / urls.py
1 # -*- coding: utf-8 -*-
2 from django.conf.urls import include, patterns, url
3 from django.views.generic import RedirectView
4 from django.contrib import admin
5 from django.conf import settings
6
7 admin.autodiscover()
8
9 urlpatterns = patterns('',
10     url(r'^$', RedirectView.as_view(url='/accounts/')),
11
12     # django-cas-provider
13     url(r'^cas/', include('cas_provider.urls')),
14
15     # Admin panel
16     url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
17     url(r'^admin/', include(admin.site.urls)),
18
19     url(r'^accounts/', include('accounts.urls')),
20 )
21
22
23 if settings.DEBUG:
24     urlpatterns += patterns('',
25         url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
26             'document_root': settings.MEDIA_ROOT,
27         }),
28    )