From f368dbe6af99c9f28bd748d11d13346969101215 Mon Sep 17 00:00:00 2001 From: "Tomas \"Jethro\" Pokorny" Date: Thu, 20 Jun 2019 21:00:23 +0200 Subject: [PATCH] Oprava URL na novy format. --- seminar/urls.py | 77 ++++++++++++++++++++++++------------------------- 1 file changed, 38 insertions(+), 39 deletions(-) diff --git a/seminar/urls.py b/seminar/urls.py index 3d82e8ac..67d0b526 100644 --- a/seminar/urls.py +++ b/seminar/urls.py @@ -1,5 +1,4 @@ -from django.conf.urls import * # NOQA -from django.conf.urls import url, include +from django.urls import path, include from django.contrib.auth.decorators import user_passes_test from . import views, export from .utils import staff_member_required @@ -9,100 +8,100 @@ staff_member_required = user_passes_test(lambda u: u.is_staff) urlpatterns = [ # REDIRECTy - url('jak-resit/', RedirectView.as_view(url='/co-je-MaM/jak-resit/')), + path('jak-resit/', RedirectView.as_view(url='/co-je-MaM/jak-resit/')), # Organizatori - url('co-je-MaM/organizatori/', views.CojemamOrganizatoriView.as_view(), name='organizatori'), - url('co-je-MaM/organizatori/organizovali/', views.CojemamOrganizatoriStariView.as_view(), name='stari_organizatori'), + path('co-je-MaM/organizatori/', views.CojemamOrganizatoriView.as_view(), name='organizatori'), + path('co-je-MaM/organizatori/organizovali/', views.CojemamOrganizatoriStariView.as_view(), name='stari_organizatori'), # Archiv - url('archiv/cisla/', views.ArchivView.as_view()), - url('archiv/temata/', views.ArchivTemataView.as_view()), + path('archiv/cisla/', views.ArchivView.as_view()), + path('archiv/temata/', views.ArchivTemataView.as_view()), - url('rocnik//', views.RocnikView.as_view(), name='seminar_rocnik'), - #url('cislo/./', views.CisloView.as_view(), name='seminar_cislo'), - url('problem//', views.ProblemView.as_view(), name='seminar_problem'), - #url('problem/(?P\d+)/(?P\d+)/', views.PrispevekView.as_view(), name='seminar_problem_prispevek'), + path('rocnik//', views.RocnikView.as_view(), name='seminar_rocnik'), + #path('cislo/./', views.CisloView.as_view(), name='seminar_cislo'), + path('problem//', views.ProblemView.as_view(), name='seminar_problem'), + #path('problem/(?P\d+)/(?P\d+)/', views.PrispevekView.as_view(), name='seminar_problem_prispevek'), # Soustredeni - url( + path( 'soustredeni/probehlo/', views.SoustredeniListView.as_view(), name='seminar_seznam_soustredeni' ), - url( + path( 'soustredeni/probehlo//', views.SoustredeniView.as_view(), name='seminar_soustredeni' ), - url( + path( 'soustredeni//seznam_ucastniku', staff_member_required(views.SoustredeniUcastniciView.as_view()), name='soustredeni_ucastnici' ), - url( + path( 'soustredeni//maily_ucastniku', staff_member_required(views.SoustredeniMailyUcastnikuView.as_view()), name='maily_ucastniku' ), - url( + path( 'soustredeni//export_ucastniku', staff_member_required(views.soustredeniUcastniciExportView), name='soustredeni_ucastnici_export' ), - url( + path( 'soustredeni//fotogalerie/', include('galerie.urls') ), # Zadani - url('zadani/aktualni/', views.AktualniZadaniView, name='seminar_aktualni_zadani'), - url('zadani/temata/', views.ZadaniTemataView, name='seminar_temata'), - #url('zadani/vysledkova-listina/', views.ZadaniAktualniVysledkovkaView, name='seminar_vysledky'), - url('', views.TitulniStranaView.as_view(), name='titulni_strana'), - url('stare-novinky/', views.StareNovinkyView.as_view(), name='stare_novinky'), + path('zadani/aktualni/', views.AktualniZadaniView, name='seminar_aktualni_zadani'), + path('zadani/temata/', views.ZadaniTemataView, name='seminar_temata'), + #path('zadani/vysledkova-listina/', views.ZadaniAktualniVysledkovkaView, name='seminar_vysledky'), + path('stare-novinky/', views.StareNovinkyView.as_view(), name='stare_novinky'), # Clanky - url('clanky/resitel/', views.ClankyResitelView.as_view(), name='clanky_resitel'), - #url('clanky/org/', views.ClankyOrganizatorView.as_view(), name='clanky_organizator'), + path('clanky/resitel/', views.ClankyResitelView.as_view(), name='clanky_resitel'), + #path('clanky/org/', views.ClankyOrganizatorView.as_view(), name='clanky_organizator'), # Aesop - url('aesop-export/mam-rocnik-.csv', export.ExportRocnikView.as_view(), name='seminar_export_rocnik'), - url('aesop-export/mam-sous-.csv', export.ExportSousView.as_view(), name='seminar_export_sous'), - url('aesop-export/index.csv', export.ExportIndexView.as_view(), name='seminar_export_index'), + path('aesop-export/mam-rocnik-.csv', export.ExportRocnikView.as_view(), name='seminar_export_rocnik'), + path('aesop-export/mam-sous-.csv', export.ExportSousView.as_view(), name='seminar_export_sous'), + path('aesop-export/index.csv', export.ExportIndexView.as_view(), name='seminar_export_index'), # Stranky viditelne pouze pro orgy: - #url( + #path( # 'rocnik/(?P\d+)/vysledkovka.tex', # staff_member_required(views.RocnikVysledkovkaView.as_view()), # name='seminar_cislo_vysledkovka' #), - #url('cislo/(?P\d+).(?P[0-9-]+)/vysledkovka.tex', + #path('cislo/(?P\d+).(?P[0-9-]+)/vysledkovka.tex', # staff_member_required(views.CisloVysledkovkaView.as_view()), name='seminar_cislo_vysledkovka'), - url('cislo/./obalky.pdf', + path('cislo/./obalky.pdf', staff_member_required(views.cisloObalkyView), name='seminar_cislo_obalky'), - #url('cislo/(?P\d+).(?P[0-9-]+)/tituly.tex', + #path('cislo/(?P\d+).(?P[0-9-]+)/tituly.tex', # staff_member_required(views.TitulyView), name='seminar_cislo_titul'), - url('stav', + path('stav', staff_member_required(views.StavDatabazeView), name='stav_databaze'), - url('cislo/./obalkovani', + path('cislo/./obalkovani', staff_member_required(views.obalkovaniView), name='seminar_cislo_resitel_obalkovani'), - url('cislo/./tex-download.json', + path('cislo/./tex-download.json', staff_member_required(views.texDownloadView), name='seminar_tex_download'), - url('soustredeni//obalky.pdf', + path('soustredeni//obalky.pdf', staff_member_required(views.soustredeniObalkyView), name='seminar_soustredeni_obalky'), - url('tex-upload/login/', views.LoginView, name='seminar_login'), - url( + path('tex-upload/login/', views.LoginView, name='seminar_login'), + path( 'tex-upload/', staff_member_required(views.texUploadView), name='seminar_tex_upload' ), - url('prihlaska/',views.get_name), + path('prihlaska/',views.get_name), + path('', views.TitulniStranaView.as_view(), name='titulni_strana'), # Ceka na autocomplete v3 - # url('autocomplete/organizatori/', + # path('autocomplete/organizatori/', # staff_member_required(views.OrganizatorAutocomplete.as_view()), # name='seminar_autocomplete_organizator')