2d44e7081b6877f7c6d55d8a4b52a1601c0ab876
[cas.git] / src / cas / urls.py
1 # -*- coding: utf-8 -*-
2 from django.urls import path, include
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     path('', RedirectView.as_view(url='/accounts/', permanent=False)),
11
12     # django-cas-provider
13     path('cas/', include('cas_provider.urls')),
14
15     # Admin panel
16     path('admin/doc/', include('django.contrib.admindocs.urls')),
17     path('admin/', admin.site.urls),
18
19     path('accounts/', include('accounts.urls')),
20 ]
21
22
23 if settings.DEBUG:
24     from django.views.static import serve
25     urlpatterns += [
26         path('media/<path>', serve, {
27             'document_root': settings.MEDIA_ROOT,
28         }),
29    ]