1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-11-30 04:13:01 +00:00
nk20/note_kfet/urls.py

40 lines
1.3 KiB
Python
Raw Normal View History

2020-02-18 20:30:26 +00:00
# Copyright (C) 2018-2020 by BDE ENS Paris-Saclay
2019-07-08 09:08:07 +00:00
# SPDX-License-Identifier: GPL-3.0-or-later
2019-07-07 20:49:02 +00:00
2020-03-07 21:28:59 +00:00
from cas import views as cas_views
from django.conf import settings
from django.conf.urls.static import static
2019-07-07 20:49:02 +00:00
from django.contrib import admin
2019-07-08 09:08:07 +00:00
from django.urls import path, include
from django.views.generic import RedirectView
2019-07-07 20:49:02 +00:00
urlpatterns = [
2019-07-17 11:34:07 +00:00
# Dev so redirect to something random
path('', RedirectView.as_view(pattern_name='note:transfer'), name='index'),
# Include project routers
path('note/', include('note.urls')),
2019-07-08 09:08:07 +00:00
2020-02-22 22:44:24 +00:00
# Include CAS Client routers
path('accounts/login/', cas_views.login, name='login'),
path('accounts/logout/', cas_views.logout, name='logout'),
2019-07-08 09:08:07 +00:00
# Include Django Contrib and Core routers
path('i18n/', include('django.conf.urls.i18n')),
2019-08-14 13:17:14 +00:00
path('accounts/', include('member.urls')),
2019-07-08 09:08:07 +00:00
path('accounts/', include('django.contrib.auth.urls')),
path('admin/doc/', include('django.contrib.admindocs.urls')),
2019-07-07 20:49:02 +00:00
path('admin/', admin.site.urls),
2020-02-06 22:29:17 +00:00
2020-02-22 22:44:24 +00:00
# Include CAS Server routers
path('cas/', include('cas_server.urls', namespace="cas_server")),
2020-02-22 13:20:22 +00:00
2020-02-06 22:29:17 +00:00
# Include Django REST API
path('api/', include('api.urls')),
2020-02-24 17:18:44 +00:00
path('logs/', include('logs.urls')),
2019-07-07 20:49:02 +00:00
]
2020-03-03 13:24:07 +00:00
2020-03-07 21:28:59 +00:00
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)