1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-12-24 00:12:23 +00:00
nk20/note_kfet/urls.py
Pierre-antoine Comby ab8888a085 Merge branch 'master' into 'alias'
# Conflicts:
#   note_kfet/settings/base.py
#   note_kfet/urls.py
2020-03-06 21:49:46 +01:00

39 lines
1.3 KiB
Python

# Copyright (C) 2018-2020 by BDE ENS Paris-Saclay
# SPDX-License-Identifier: GPL-3.0-or-later
from django.contrib import admin
from django.urls import path, include
from django.views.generic import RedirectView
from django.conf.urls.static import static
from django.conf import settings
from cas import views as cas_views
urlpatterns = [
# Dev so redirect to something random
path('', RedirectView.as_view(pattern_name='note:transfer'), name='index'),
# Include project routers
path('note/', include('note.urls')),
# Include CAS Client routers
path('accounts/login/', cas_views.login, name='login'),
path('accounts/logout/', cas_views.logout, name='logout'),
# Include Django Contrib and Core routers
path('i18n/', include('django.conf.urls.i18n')),
path('accounts/', include('member.urls')),
path('accounts/', include('django.contrib.auth.urls')),
path('admin/doc/', include('django.contrib.admindocs.urls')),
path('admin/', admin.site.urls),
# Include CAS Server routers
path('cas/', include('cas_server.urls', namespace="cas_server")),
# Include Django REST API
path('api/', include('api.urls')),
]
urlpatterns += static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT)
urlpatterns += static(settings.STATIC_URL,document_root=settings.STATIC_ROOT)