abe01e8d16f9daf925c8c7a4d8fe21d5b87d3db6
[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('services/', include('services.urls')),
20     path('ssh/', include('ssh_keys.urls')),
21     path('auth/', include('django.contrib.auth.urls')),
22 ]
23
24
25 if settings.DEBUG:
26     from django.views.static import serve
27     urlpatterns += [
28         path('media/<path>', serve, {
29             'document_root': settings.MEDIA_ROOT,
30         }),
31    ]