ce01eb09c90015ef2d1c5c6c0184dea16c10ea21
[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
7 admin.site.site_header = settings.SITE_TITLE
8
9
10 urlpatterns = [
11     path('', RedirectView.as_view(url=settings.LOGIN_REDIRECT_URL, permanent=False)),
12
13     # django-cas-provider
14     path('cas/', include('cas_provider.urls')),
15
16     path('openid/', include('oidc_provider.urls', namespace='oidc_provider')),
17
18     # Admin panel
19     path('admin/doc/', include('django.contrib.admindocs.urls')),
20     path('admin/', admin.site.urls),
21
22     path('accounts/', include('accounts.urls')),
23     path('email/', include('emails.urls')),
24     path('services/', include('services.urls')),
25     path('ssh/', include('ssh_keys.urls')),
26     path('auth/', include('django.contrib.auth.urls')),
27 ]
28
29
30 if settings.DEBUG:
31     from django.views.static import serve
32     urlpatterns += [
33         path('media/<path>', serve, {
34             'document_root': settings.MEDIA_ROOT,
35         }),
36    ]