2015-10-11 18:01:38 +02:00
|
|
|
from django.conf.urls import * # NOQA
|
2017-04-06 11:58:01 +02:00
|
|
|
from django.conf.urls import url, include
|
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
|
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 = [
|
2016-05-08 11:26:10 +02:00
|
|
|
# REDIRECTy
|
|
|
|
url(r'^jak-resit/$', RedirectView.as_view(url='/co-je-MaM/jak-resit/')),
|
|
|
|
|
|
|
|
# Organizatori
|
2015-08-23 15:06:47 +02:00
|
|
|
url(r'^co-je-MaM/organizatori/$', views.CojemamOrganizatoriView.as_view(), name='organizatori'),
|
|
|
|
url(r'^co-je-MaM/organizatori/organizovali/$', views.CojemamOrganizatoriStariView.as_view(), name='stari_organizatori'),
|
2015-06-03 14:16:30 +02:00
|
|
|
|
2016-05-08 11:26:10 +02:00
|
|
|
# Archiv
|
2017-02-04 23:28:54 +01:00
|
|
|
url(r'^archiv/cisla/$', views.ArchivView.as_view()),
|
2015-09-09 22:52:06 +02:00
|
|
|
url(r'^archiv/temata/$', views.ArchivTemataView.as_view()),
|
2015-06-08 22:38:13 +02:00
|
|
|
|
|
|
|
url(r'^rocnik/(?P<rocnik>\d+)/$', views.RocnikView.as_view(), name='seminar_rocnik'),
|
2019-04-23 23:26:37 +02:00
|
|
|
#url(r'^cislo/(?P<rocnik>\d+)\.(?P<cislo>[0-9-]+)/$', views.CisloView.as_view(), name='seminar_cislo'),
|
2015-06-08 22:38:13 +02:00
|
|
|
url(r'^problem/(?P<pk>\d+)/$', views.ProblemView.as_view(), name='seminar_problem'),
|
2019-04-23 23:26:37 +02:00
|
|
|
#url(r'^problem/(?P<pk>\d+)/(?P<prispevek>\d+)/$', views.PrispevekView.as_view(), name='seminar_problem_prispevek'),
|
2015-06-04 10:13:52 +02:00
|
|
|
|
2016-05-08 11:26:10 +02:00
|
|
|
# Soustredeni
|
2017-04-06 11:58:01 +02:00
|
|
|
url(
|
|
|
|
r'^soustredeni/probehlo/$',
|
|
|
|
views.SoustredeniListView.as_view(),
|
|
|
|
name='seminar_seznam_soustredeni'
|
|
|
|
),
|
|
|
|
url(
|
|
|
|
r'^soustredeni/probehlo/(?P<soustredeni>\d+)/$',
|
|
|
|
views.SoustredeniView.as_view(),
|
|
|
|
name='seminar_soustredeni'
|
|
|
|
),
|
|
|
|
url(
|
|
|
|
r'^soustredeni/(?P<soustredeni>\d+)/seznam_ucastniku$',
|
|
|
|
staff_member_required(views.SoustredeniUcastniciView.as_view()),
|
|
|
|
name='soustredeni_ucastnici'
|
|
|
|
),
|
|
|
|
url(
|
|
|
|
r'^soustredeni/(?P<soustredeni>\d+)/maily_ucastniku$',
|
|
|
|
staff_member_required(views.SoustredeniMailyUcastnikuView.as_view()),
|
|
|
|
name='maily_ucastniku'
|
|
|
|
),
|
|
|
|
url(
|
|
|
|
r'^soustredeni/(?P<soustredeni>\d+)/stvrzenky/(?P<first_num>\d+)$',
|
|
|
|
staff_member_required(views.soustredeniStvrzenkyExportView),
|
|
|
|
name='soustredeni_stvrzenky'
|
|
|
|
),
|
|
|
|
url(
|
|
|
|
r'^soustredeni/(?P<soustredeni>\d+)/export_ucastniku$',
|
|
|
|
staff_member_required(views.soustredeniUcastniciExportView),
|
|
|
|
name='soustredeni_ucastnici_export'
|
|
|
|
),
|
|
|
|
url(
|
|
|
|
r'^soustredeni/(?P<soustredeni>\d+)/fotogalerie/',
|
|
|
|
include('galerie.urls')
|
|
|
|
),
|
2015-05-21 17:44:20 +02:00
|
|
|
|
2016-05-08 11:26:10 +02:00
|
|
|
# Zadani
|
2015-06-04 10:18:52 +02:00
|
|
|
url(r'^zadani/aktualni/$', views.AktualniZadaniView, name='seminar_aktualni_zadani'),
|
2015-09-10 11:04:56 +02:00
|
|
|
url(r'^zadani/temata/$', views.ZadaniTemataView, name='seminar_temata'),
|
2019-04-23 23:26:37 +02:00
|
|
|
#url(r'^zadani/vysledkova-listina/$', views.ZadaniAktualniVysledkovkaView, name='seminar_vysledky'),
|
2015-09-04 10:17:07 +02:00
|
|
|
url(r'^$', views.TitulniStranaView.as_view(), name='titulni_strana'),
|
2015-09-12 00:22:17 +02:00
|
|
|
url(r'^stare-novinky/$', views.StareNovinkyView.as_view(), name='stare_novinky'),
|
2015-05-06 17:07:32 +02:00
|
|
|
|
2016-05-08 11:26:10 +02:00
|
|
|
# Clanky
|
2015-09-13 15:31:34 +02:00
|
|
|
url(r'^clanky/resitel/$', views.ClankyResitelView.as_view(), name='clanky_resitel'),
|
2019-04-23 23:26:37 +02:00
|
|
|
#url(r'^clanky/org/$', views.ClankyOrganizatorView.as_view(), name='clanky_organizator'),
|
2015-09-13 15:31:34 +02:00
|
|
|
|
2016-05-08 11:26:10 +02:00
|
|
|
# Aesop
|
2015-05-11 12:58:21 +02:00
|
|
|
url(r'^aesop-export/mam-rocnik-(?P<prvni_rok>\d+)\.csv$', export.ExportRocnikView.as_view(), name='seminar_export_rocnik'),
|
2015-06-29 00:27:02 +02:00
|
|
|
url(r'^aesop-export/mam-sous-(?P<datum_zacatku>[\d-]+)\.csv$', export.ExportSousView.as_view(), name='seminar_export_sous'),
|
2015-05-11 12:58:21 +02:00
|
|
|
url(r'^aesop-export/index.csv$', export.ExportIndexView.as_view(), name='seminar_export_index'),
|
2015-11-15 16:14:07 +01:00
|
|
|
|
2016-10-26 22:43:32 +02:00
|
|
|
# Stranky viditelne pouze pro orgy:
|
2019-04-23 23:26:37 +02:00
|
|
|
#url(
|
|
|
|
# r'^rocnik/(?P<rocnik>\d+)/vysledkovka.tex$',
|
|
|
|
# staff_member_required(views.RocnikVysledkovkaView.as_view()),
|
|
|
|
# name='seminar_cislo_vysledkovka'
|
|
|
|
#),
|
|
|
|
#url(r'^cislo/(?P<rocnik>\d+).(?P<cislo>[0-9-]+)/vysledkovka.tex$',
|
|
|
|
# staff_member_required(views.CisloVysledkovkaView.as_view()), name='seminar_cislo_vysledkovka'),
|
2016-01-25 23:13:40 +01:00
|
|
|
url(r'^cislo/(?P<rocnik>\d+).(?P<cislo>[0-9-]+)/obalky.pdf$',
|
2016-01-09 18:47:16 +01:00
|
|
|
staff_member_required(views.cisloObalkyView), name='seminar_cislo_obalky'),
|
|
|
|
|
2019-04-23 23:26:37 +02:00
|
|
|
#url(r'^cislo/(?P<rocnik>\d+).(?P<cislo>[0-9-]+)/tituly.tex$',
|
|
|
|
# staff_member_required(views.TitulyView), name='seminar_cislo_titul'),
|
2016-01-25 23:13:40 +01:00
|
|
|
url(r'^stav$',
|
2016-01-09 18:47:16 +01:00
|
|
|
staff_member_required(views.StavDatabazeView), name='stav_databaze'),
|
2016-01-26 00:24:05 +01:00
|
|
|
url(r'^cislo/(?P<rocnik>\d+).(?P<cislo>[0-9-]+)/obalkovani$',
|
|
|
|
staff_member_required(views.obalkovaniView), name='seminar_cislo_resitel_obalkovani'),
|
2016-02-21 14:36:41 +01:00
|
|
|
url(r'^cislo/(?P<rocnik>\d+).(?P<cislo>[0-9-]+)/tex-download.json$',
|
|
|
|
staff_member_required(views.texDownloadView), name='seminar_tex_download'),
|
2016-01-25 23:13:40 +01:00
|
|
|
url(r'^soustredeni/(?P<soustredeni>\d+)/obalky.pdf',
|
|
|
|
staff_member_required(views.soustredeniObalkyView), name='seminar_soustredeni_obalky'),
|
2016-02-17 16:17:11 +01:00
|
|
|
|
|
|
|
url(r'^tex-upload/login/$', views.LoginView, name='seminar_login'),
|
2017-01-20 12:13:25 +01:00
|
|
|
url(
|
|
|
|
r'^tex-upload/$',
|
|
|
|
staff_member_required(views.texUploadView),
|
|
|
|
name='seminar_tex_upload'
|
|
|
|
),
|
2018-12-05 23:37:05 +01:00
|
|
|
url(r'^prihlaska/$',views.get_name),
|
2016-11-14 09:06:48 +01:00
|
|
|
|
|
|
|
# Ceka na autocomplete v3
|
2017-01-20 12:13:25 +01:00
|
|
|
# url(r'^autocomplete/organizatori/$',
|
|
|
|
# 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
|
|
|
]
|