297b82b5b758113c0ecfb77abf5d2dbdc50cde6a
[cas.git] / src / cas / urls.py
1 from django.urls import path, include
2 from django.views.generic import RedirectView
3 from django.contrib import admin
4 from django.conf import settings
5
6 admin.autodiscover()
7
8 urlpatterns = [
9     path('', RedirectView.as_view(url='/accounts/', permanent=False)),
10
11     # django-cas-provider
12     path('cas/', include('cas_provider.urls')),
13
14     # Admin panel
15     path('admin/doc/', include('django.contrib.admindocs.urls')),
16     path('admin/', admin.site.urls),
17
18     path('accounts/', include('accounts.urls')),
19     path('auth/', include('django.contrib.auth.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    ]