2020-09-18 20:45:47 +02:00
|
|
|
from django.urls import path, include, re_path
|
2016-01-06 19:36:15 +01:00
|
|
|
from django.contrib.auth.decorators import user_passes_test
|
2015-05-06 17:07:32 +02:00
|
|
|
from . import views, export
|
2019-04-23 23:26:37 +02:00
|
|
|
from .utils import staff_member_required
|
2016-05-08 11:26:10 +02:00
|
|
|
from django.views.generic.base import RedirectView
|
2019-09-01 22:59:05 +02:00
|
|
|
from django.contrib.auth import views as auth_views
|
2015-03-14 22:52:45 +01:00
|
|
|
|
2016-01-06 19:36:15 +01:00
|
|
|
staff_member_required = user_passes_test(lambda u: u.is_staff)
|
|
|
|
|
2016-01-09 17:28:20 +01:00
|
|
|
urlpatterns = [
|
2020-03-19 00:59:31 +01:00
|
|
|
# path('aktualni/temata/', views.TemataRozcestnikView),
|
|
|
|
# path('<int:rocnik>/t<int:tematko>/', views.TematkoView),
|
2019-12-05 00:50:04 +01:00
|
|
|
|
2019-05-11 01:15:05 +02:00
|
|
|
# REDIRECTy
|
2019-06-20 21:00:23 +02:00
|
|
|
path('jak-resit/', RedirectView.as_view(url='/co-je-MaM/jak-resit/')),
|
2016-05-08 11:26:10 +02:00
|
|
|
|
2019-05-11 01:15:05 +02:00
|
|
|
# Organizatori
|
2019-06-20 21:00:23 +02:00
|
|
|
path('co-je-MaM/organizatori/', views.CojemamOrganizatoriView.as_view(), name='organizatori'),
|
|
|
|
path('co-je-MaM/organizatori/organizovali/', views.CojemamOrganizatoriStariView.as_view(), name='stari_organizatori'),
|
2015-06-03 14:16:30 +02:00
|
|
|
|
2019-05-11 01:15:05 +02:00
|
|
|
# Archiv
|
2019-06-20 21:00:23 +02:00
|
|
|
path('archiv/cisla/', views.ArchivView.as_view()),
|
|
|
|
path('archiv/temata/', views.ArchivTemataView.as_view()),
|
2015-06-08 22:38:13 +02:00
|
|
|
|
2019-06-20 21:00:23 +02:00
|
|
|
path('rocnik/<int:rocnik>/', views.RocnikView.as_view(), name='seminar_rocnik'),
|
2020-03-11 22:17:57 +01:00
|
|
|
path('cislo/<int:rocnik>.<int:cislo>/', views.CisloView.as_view(), name='seminar_cislo'), # odkomentované jenom kvůli testování archivu
|
2019-06-20 21:00:23 +02:00
|
|
|
path('problem/<int:pk>/', views.ProblemView.as_view(), name='seminar_problem'),
|
2020-03-19 00:50:39 +01:00
|
|
|
path('treenode/<int:pk>/', views.TreeNodeView.as_view(), name='seminar_treenode'),
|
2020-09-03 23:02:28 +02:00
|
|
|
path('treenode/<int:pk>/json/', views.TreeNodeJSONView.as_view(), name='seminar_treenode_json'),
|
|
|
|
path('treenode/text/<int:pk>/', views.TextWebView.as_view(), name='seminar_textnode_web'),
|
2020-06-12 01:56:07 +02:00
|
|
|
path('treenode/editor/pridat/<str:co>/<int:pk>/<str:kam>/', views.TreeNodePridatView.as_view(), name='treenode_pridat'),
|
2020-05-07 00:53:54 +02:00
|
|
|
path('treenode/editor/smazat/<int:pk>/', views.TreeNodeSmazatView.as_view(), name='treenode_smazat'),
|
2020-06-03 23:50:55 +02:00
|
|
|
path('treenode/editor/odvesitpryc/<int:pk>/', views.TreeNodeOdvesitPrycView.as_view(), name='treenode_odvesitpryc'),
|
2020-05-07 00:53:54 +02:00
|
|
|
path('treenode/editor/podvesit/<int:pk>/<str:kam>/', views.TreeNodePodvesitView.as_view(), name='treenode_podvesit'),
|
|
|
|
path('treenode/editor/prohodit/<int:pk>/', views.TreeNodeProhoditView.as_view(), name='treenode_prohodit'),
|
2020-06-03 23:50:55 +02:00
|
|
|
path('treenode/sirotcinec/', views.SirotcinecView.as_view(), name='seminar_treenode_sirotcinec'),
|
2019-06-20 21:00:23 +02:00
|
|
|
#path('problem/(?P<pk>\d+)/(?P<prispevek>\d+)/', views.PrispevekView.as_view(), name='seminar_problem_prispevek'),
|
2015-06-04 10:13:52 +02:00
|
|
|
|
2019-05-11 01:15:05 +02:00
|
|
|
# Soustredeni
|
2019-06-20 21:00:23 +02:00
|
|
|
path(
|
2019-06-11 01:26:12 +02:00
|
|
|
'soustredeni/probehlo/',
|
2019-05-11 01:15:05 +02:00
|
|
|
views.SoustredeniListView.as_view(),
|
|
|
|
name='seminar_seznam_soustredeni'
|
|
|
|
),
|
2019-06-20 21:00:23 +02:00
|
|
|
path(
|
2019-06-11 01:26:12 +02:00
|
|
|
'soustredeni/<int:soustredeni>/seznam_ucastniku',
|
2019-05-11 01:15:05 +02:00
|
|
|
staff_member_required(views.SoustredeniUcastniciView.as_view()),
|
|
|
|
name='soustredeni_ucastnici'
|
|
|
|
),
|
2019-06-20 21:00:23 +02:00
|
|
|
path(
|
2019-06-11 01:26:12 +02:00
|
|
|
'soustredeni/<int:soustredeni>/maily_ucastniku',
|
2019-05-11 01:15:05 +02:00
|
|
|
staff_member_required(views.SoustredeniMailyUcastnikuView.as_view()),
|
|
|
|
name='maily_ucastniku'
|
|
|
|
),
|
2019-06-20 21:00:23 +02:00
|
|
|
path(
|
2019-06-11 01:26:12 +02:00
|
|
|
'soustredeni/<int:soustredeni>/export_ucastniku',
|
2019-05-11 01:15:05 +02:00
|
|
|
staff_member_required(views.soustredeniUcastniciExportView),
|
|
|
|
name='soustredeni_ucastnici_export'
|
|
|
|
),
|
2019-06-20 21:00:23 +02:00
|
|
|
path(
|
2019-06-11 01:26:12 +02:00
|
|
|
'soustredeni/<int:soustredeni>/fotogalerie/',
|
2019-05-11 01:15:05 +02:00
|
|
|
include('galerie.urls')
|
|
|
|
),
|
2015-05-21 17:44:20 +02:00
|
|
|
|
2019-05-11 01:15:05 +02:00
|
|
|
# Zadani
|
2020-03-25 21:01:14 +01:00
|
|
|
path('zadani/aktualni/', views.AktualniZadaniView.as_view(), name='seminar_aktualni_zadani'),
|
2020-03-19 00:59:31 +01:00
|
|
|
# path('zadani/temata/', views.ZadaniTemataView, name='seminar_temata'),
|
2019-06-20 21:00:23 +02:00
|
|
|
#path('zadani/vysledkova-listina/', views.ZadaniAktualniVysledkovkaView, name='seminar_vysledky'),
|
|
|
|
path('stare-novinky/', views.StareNovinkyView.as_view(), name='stare_novinky'),
|
2015-05-06 17:07:32 +02:00
|
|
|
|
2019-05-11 01:15:05 +02:00
|
|
|
# Clanky
|
2019-06-20 21:00:23 +02:00
|
|
|
path('clanky/resitel/', views.ClankyResitelView.as_view(), name='clanky_resitel'),
|
|
|
|
#path('clanky/org/', views.ClankyOrganizatorView.as_view(), name='clanky_organizator'),
|
2015-09-13 15:31:34 +02:00
|
|
|
|
2019-05-11 01:15:05 +02:00
|
|
|
# Aesop
|
2019-06-20 21:00:23 +02:00
|
|
|
path('aesop-export/mam-rocnik-<int:prvni_rok>.csv', export.ExportRocnikView.as_view(), name='seminar_export_rocnik'),
|
|
|
|
path('aesop-export/mam-sous-<str:datum_zacatku>.csv', export.ExportSousView.as_view(), name='seminar_export_sous'),
|
|
|
|
path('aesop-export/index.csv', export.ExportIndexView.as_view(), name='seminar_export_index'),
|
2015-11-15 16:14:07 +01:00
|
|
|
|
2019-05-11 01:15:05 +02:00
|
|
|
# Stranky viditelne pouze pro orgy:
|
2020-04-15 22:30:58 +02:00
|
|
|
path(
|
|
|
|
'rocnik/<int:rocnik>/vysledkovka.tex',
|
|
|
|
staff_member_required(views.RocnikVysledkovkaView.as_view()),
|
|
|
|
name='seminar_rocnik_vysledkovka'
|
|
|
|
),
|
|
|
|
path('cislo/<int:rocnik>.<int:cislo>/vysledkovka.tex',
|
|
|
|
staff_member_required(views.CisloVysledkovkaView.as_view()),
|
|
|
|
name='seminar_cislo_vysledkovka'
|
|
|
|
),
|
2019-06-20 21:00:23 +02:00
|
|
|
path('cislo/<int:rocnik>.<int:cislo>/obalky.pdf',
|
2019-05-11 01:15:05 +02:00
|
|
|
staff_member_required(views.cisloObalkyView), name='seminar_cislo_obalky'),
|
2016-01-09 18:47:16 +01:00
|
|
|
|
2020-04-16 00:51:38 +02:00
|
|
|
path('cislo/<int:rocnik>.<int:cislo>/tituly.tex',
|
|
|
|
staff_member_required(views.TitulyView), name='seminar_cislo_titul'),
|
2019-06-20 21:00:23 +02:00
|
|
|
path('stav',
|
2019-05-11 01:15:05 +02:00
|
|
|
staff_member_required(views.StavDatabazeView), name='stav_databaze'),
|
2019-06-20 21:00:23 +02:00
|
|
|
path('cislo/<int:rocnik>.<int:cislo>/obalkovani',
|
2020-01-29 22:22:54 +01:00
|
|
|
staff_member_required(views.ObalkovaniView.as_view()), name='seminar_cislo_resitel_obalkovani'),
|
2019-06-20 21:00:23 +02:00
|
|
|
path('soustredeni/<int:soustredeni>/obalky.pdf',
|
2019-05-11 01:15:05 +02:00
|
|
|
staff_member_required(views.soustredeniObalkyView), name='seminar_soustredeni_obalky'),
|
2016-02-17 16:17:11 +01:00
|
|
|
|
2020-01-29 22:22:54 +01:00
|
|
|
path('org/vloz_body/<int:tema>/',
|
|
|
|
staff_member_required(views.VlozBodyView.as_view()),name='seminar_org_vlozbody'),
|
2019-09-02 00:01:39 +02:00
|
|
|
path('auth/prihlaska/',views.prihlaskaView, name='seminar_prihlaska'),
|
2019-12-13 16:38:56 +01:00
|
|
|
path('auth/login/', views.LoginView.as_view(), name='login'),
|
2019-12-19 01:30:48 +01:00
|
|
|
path('auth/logout/', views.LogoutView.as_view(), name='logout'),
|
2019-09-02 00:01:39 +02:00
|
|
|
path('auth/resitel/', views.ResitelView.as_view(), name='seminar_resitel'),
|
2019-12-19 01:30:48 +01:00
|
|
|
path('auth/reset_password/', views.PasswordResetView.as_view(), name='reset_password'),
|
|
|
|
path('auth/change_password/', views.PasswordChangeView.as_view(), name='change_password'),
|
|
|
|
path('auth/reset_password_done/', views.PasswordResetDoneView.as_view(), name='reset_password_done'),
|
2020-01-15 23:55:13 +01:00
|
|
|
path('auth/reset_password_confirm/<uidb64>/<token>/', views.PasswordResetConfirmView.as_view(), name='password_reset_confirm'),
|
2019-12-19 01:30:48 +01:00
|
|
|
path('auth/reset_password_complete/', views.PasswordResetCompleteView.as_view(), name='reset_password_complete'),
|
2019-09-02 00:01:39 +02:00
|
|
|
path('auth/resitel_edit', views.resitelEditView, name='seminar_resitel_edit'),
|
2020-02-05 23:30:41 +01:00
|
|
|
|
2020-03-19 00:50:39 +01:00
|
|
|
# Autocomplete
|
|
|
|
path('autocomplete/skola/',views.SkolaAutocomplete.as_view(), name='autocomplete_skola'),
|
|
|
|
path('autocomplete/resitel/',views.ResitelAutocomplete.as_view(), name='autocomplete_resitel'),
|
|
|
|
path('autocomplete/problem/odevzdatelny',views.OdevzdatelnyProblemAutocomplete.as_view(), name='autocomplete_problem_odevzdatelny'),
|
2020-02-05 23:30:41 +01:00
|
|
|
|
2020-02-05 23:59:21 +01:00
|
|
|
path('temp/add_solution', views.AddSolutionView.as_view(),name='seminar_vloz_reseni'),
|
2020-05-20 21:44:12 +02:00
|
|
|
path('temp/nahraj_reseni', views.NahrajReseniView.as_view(),name='seminar_nahraj_reseni'),
|
2020-02-05 23:30:41 +01:00
|
|
|
|
2020-09-18 20:45:47 +02:00
|
|
|
re_path(r'^temp/vue/.*$',views.VueTestView.as_view(),name='vue_test_view'),
|
2020-09-03 23:02:28 +02:00
|
|
|
|
2019-06-20 21:00:23 +02:00
|
|
|
path('', views.TitulniStranaView.as_view(), name='titulni_strana'),
|
2016-11-14 09:06:48 +01:00
|
|
|
|
2019-05-11 01:15:05 +02:00
|
|
|
# Ceka na autocomplete v3
|
2019-06-20 21:00:23 +02:00
|
|
|
# path('autocomplete/organizatori/',
|
2019-05-11 01:15:05 +02:00
|
|
|
# staff_member_required(views.OrganizatorAutocomplete.as_view()),
|
|
|
|
# name='seminar_autocomplete_organizator')
|
2016-11-14 09:06:48 +01:00
|
|
|
|
|
|
|
|
2016-01-09 17:28:20 +01:00
|
|
|
]
|