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.
79 lines
2.4 KiB
79 lines
2.4 KiB
"""
|
|
Soubor sloužící jako základní „router“, tj. zde se includují veškeré ostatní 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')),
|
|
|
|
# Tvorba = ročníky, čísla, problémy atd. (ma vlastni podadresare)
|
|
path('', include('tvorba.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('soustredeni/', 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')),
|
|
|
|
# Novinková aplikace (ma vlastni podadresare)
|
|
path('', include('novinky.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')),
|
|
|
|
# Various = co se nevešlo jinam
|
|
path('', include('various.urls')),
|
|
|
|
# REST API
|
|
# path('api/', include(router.urls)),
|
|
|
|
# Výroční sraz
|
|
path('sraz/30-let/', include('vyroci.urls')),
|
|
|
|
# Miniapka na šifrovačku
|
|
path('sifrovacka/', include('sifrovacka.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()
|
|
|