9db4e4187141936fbbe19b27aa1b33d054ac0c05
[cas.git] / src / cas / urls.py
1 # -*- coding: utf-8 -*-
2 from django.conf.urls import include, 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 = [
10     url(r'^$', RedirectView.as_view(url='/accounts/', permanent=False)),
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     from django.views.static import serve
25     urlpatterns += [
26         url(r'^media/(?P<path>.*)$', serve, {
27             'document_root': settings.MEDIA_ROOT,
28         }),
29    ]