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')), # Comments (interni i verejne) path('comments_dj/', include('django_comments.urls')), # REST API # path('api/', include(router.urls)), # Výroční sraz path('sraz/30-let/', include('vyroci.urls')), ] # This is only needed when using runserver. if settings.DEBUG: import debug_toolbar urlpatterns += [ path('media/', 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()