Web M&M
https://mam.matfyz.cz
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
85 lines
2.5 KiB
85 lines
2.5 KiB
"""
|
|
Soubor sloužící jako základní „router“, tj. zde se includují veškeré ostatní urls:
|
|
|
|
- ``admin/`` :mod:`django.contrib.admin.site.urls`
|
|
- ``ckeditor/`` :mod:`ckeditor_uploader.urls`
|
|
- :mod:`seminar.urls`
|
|
- :mod:`odevzdavatko.urls`
|
|
- :mod:`korektury.urls`
|
|
- :mod:`prednasky.urls`
|
|
- :mod:`soustredeni.urls`
|
|
- :mod:`personalni.urls`
|
|
- :mod:`various.autentizace.urls`
|
|
- :mod:`api.urls`
|
|
- :mod:`treenode.urls`
|
|
- :mod:`aesop.urls`
|
|
- ``comments_dj/`` :mod:`django_comments.urls`
|
|
"""
|
|
from django.urls import path, include
|
|
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
|
|
from django.contrib import admin
|
|
from django.conf import settings
|
|
from django.views.generic.base import TemplateView
|
|
from django import views
|
|
from django.urls import path # As per docs.
|
|
|
|
from treenode.routers import router
|
|
|
|
urlpatterns = [
|
|
|
|
# Admin a nastroje
|
|
path('admin/', admin.site.urls), # NOQA
|
|
path('ckeditor/', include('ckeditor_uploader.urls')),
|
|
|
|
# Seminarova aplikace (ma vlastni podadresare)
|
|
path('', include('seminar.urls')),
|
|
|
|
# Odevzdavatko (ma vlastni podadresare)
|
|
path('', include('odevzdavatko.urls')),
|
|
|
|
# Korekturovaci aplikace (ma vlastni podadresare)
|
|
path('', include('korektury.urls')),
|
|
|
|
# Prednaskova aplikace (ma vlastni podadresare)
|
|
path('', include('prednasky.urls')),
|
|
|
|
# Soustredkova aplikace (ma vlastni podadresare)
|
|
path('', include('soustredeni.urls')),
|
|
|
|
# Personalni aplikace (ma vlastni podadresare)
|
|
# (profil, osobní údaje, ..., ne autentizace, viz dále)
|
|
path('', include('personalni.urls')),
|
|
|
|
# Autentizační aplikace (ma vlastni podadresare)
|
|
path('', include('various.autentizace.urls')),
|
|
|
|
# Api (ma vlastni podadresare) (autocomplete apod.)
|
|
path('', include('api.urls')),
|
|
|
|
# treenode (ma vlastni podadresare)
|
|
path('', include('treenode.urls')),
|
|
|
|
# Aesop (ma vlastni podadresare)
|
|
path('', include('aesop.urls')),
|
|
|
|
# Comments (interni i verejne)
|
|
path('comments_dj/', include('django_comments.urls')),
|
|
|
|
# REST API
|
|
# path('api/', include(router.urls)),
|
|
|
|
]
|
|
|
|
# This is only needed when using runserver.
|
|
if settings.DEBUG:
|
|
import debug_toolbar
|
|
urlpatterns += [
|
|
path('media/<path:path>', views.static.serve, # NOQA
|
|
{'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
|
|
path('__debug__/', include(debug_toolbar.urls)),
|
|
path('400.html', TemplateView.as_view(template_name="400.html")),
|
|
path('403.html', TemplateView.as_view(template_name="403.html")),
|
|
path('404.html', TemplateView.as_view(template_name="404.html")),
|
|
path('500.html', TemplateView.as_view(template_name="500.html")),
|
|
]
|
|
urlpatterns += staticfiles_urlpatterns()
|
|
|