Merge branch 'data_migrations' of gimli.ms.mff.cuni.cz:/akce/mam/git/mamweb into data_migrations
This commit is contained in:
commit
2eaabaf021
4 changed files with 58 additions and 220 deletions
175
data/flat.json
175
data/flat.json
File diff suppressed because one or more lines are too long
|
@ -9,7 +9,7 @@
|
||||||
{% endblock %}{% endblock %}
|
{% endblock %}{% endblock %}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
{% if vysledkovka %}
|
{% if radky_vysledkovky %}
|
||||||
{% include "seminar/vysledkovka_rocnik.html" %}
|
{% include "seminar/vysledkovka_rocnik.html" %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>V tomto ročníku zatím žádné výsledky nejsou.</p>
|
<p>V tomto ročníku zatím žádné výsledky nejsou.</p>
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
{% if user.je_org and vysledkovka_s_neverejnymi %}
|
{% if user.je_org and vysledkovka_s_neverejnymi %}
|
||||||
<div class='mam-org-only'>
|
<div class='mam-org-only'>
|
||||||
<h1>Výsledky včetně neveřejných</h1>
|
<h1>Výsledky včetně neveřejných</h1>
|
||||||
{% with vysledkovka_s_neverejnymi as vysledkovka %}
|
{% with vysledkovka_s_neverejnymi as radky_vysledkovky %}
|
||||||
{% include "seminar/vysledkovka_rocnik.html" %}
|
{% include "seminar/vysledkovka_rocnik.html" %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -9,8 +9,8 @@ urlpatterns = [
|
||||||
# path('<int:rocnik>/t<int:tematko>/', views.TematkoView),
|
# path('<int:rocnik>/t<int:tematko>/', views.TematkoView),
|
||||||
|
|
||||||
# Organizatori
|
# Organizatori
|
||||||
path('co-je-MaM/organizatori/', views.CojemamOrganizatoriView.as_view(), name='organizatori'),
|
path('o-nas/organizatori/', views.CojemamOrganizatoriView.as_view(), name='organizatori'),
|
||||||
path('co-je-MaM/organizatori/organizovali/', views.CojemamOrganizatoriStariView.as_view(), name='stari_organizatori'),
|
path('o-nas/organizatori/organizovali/', views.CojemamOrganizatoriStariView.as_view(), name='stari_organizatori'),
|
||||||
|
|
||||||
# Archiv
|
# Archiv
|
||||||
path('archiv/rocniky/', views.ArchivView.as_view(), name="seminar_archiv_rocniky"),
|
path('archiv/rocniky/', views.ArchivView.as_view(), name="seminar_archiv_rocniky"),
|
||||||
|
@ -19,15 +19,15 @@ urlpatterns = [
|
||||||
path('rocnik/<int:rocnik>/', views.RocnikView.as_view(), name='seminar_rocnik'),
|
path('rocnik/<int:rocnik>/', views.RocnikView.as_view(), name='seminar_rocnik'),
|
||||||
path('cislo/<int:rocnik>.<str:cislo>/', views.CisloView.as_view(), name='seminar_cislo'),
|
path('cislo/<int:rocnik>.<str:cislo>/', views.CisloView.as_view(), name='seminar_cislo'),
|
||||||
path('problem/<int:pk>/', views.ProblemView.as_view(), name='seminar_problem'),
|
path('problem/<int:pk>/', views.ProblemView.as_view(), name='seminar_problem'),
|
||||||
path('treenode/<int:pk>/', views.TreeNodeView.as_view(), name='seminar_treenode'),
|
#path('treenode/<int:pk>/', views.TreeNodeView.as_view(), name='seminar_treenode'),
|
||||||
path('treenode/<int:pk>/json/', views.TreeNodeJSONView.as_view(), name='seminar_treenode_json'),
|
#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'),
|
#path('treenode/text/<int:pk>/', views.TextWebView.as_view(), name='seminar_textnode_web'),
|
||||||
path('treenode/editor/pridat/<str:co>/<int:pk>/<str:kam>/', views.TreeNodePridatView.as_view(), name='treenode_pridat'),
|
#path('treenode/editor/pridat/<str:co>/<int:pk>/<str:kam>/', views.TreeNodePridatView.as_view(), name='treenode_pridat'),
|
||||||
path('treenode/editor/smazat/<int:pk>/', views.TreeNodeSmazatView.as_view(), name='treenode_smazat'),
|
#path('treenode/editor/smazat/<int:pk>/', views.TreeNodeSmazatView.as_view(), name='treenode_smazat'),
|
||||||
path('treenode/editor/odvesitpryc/<int:pk>/', views.TreeNodeOdvesitPrycView.as_view(), name='treenode_odvesitpryc'),
|
#path('treenode/editor/odvesitpryc/<int:pk>/', views.TreeNodeOdvesitPrycView.as_view(), name='treenode_odvesitpryc'),
|
||||||
path('treenode/editor/podvesit/<int:pk>/<str:kam>/', views.TreeNodePodvesitView.as_view(), name='treenode_podvesit'),
|
#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'),
|
#path('treenode/editor/prohodit/<int:pk>/', views.TreeNodeProhoditView.as_view(), name='treenode_prohodit'),
|
||||||
path('treenode/sirotcinec/', views.SirotcinecView.as_view(), name='seminar_treenode_sirotcinec'),
|
#path('treenode/sirotcinec/', views.SirotcinecView.as_view(), name='seminar_treenode_sirotcinec'),
|
||||||
#path('problem/(?P<pk>\d+)/(?P<prispevek>\d+)/', views.PrispevekView.as_view(), name='seminar_problem_prispevek'),
|
#path('problem/(?P<pk>\d+)/(?P<prispevek>\d+)/', views.PrispevekView.as_view(), name='seminar_problem_prispevek'),
|
||||||
|
|
||||||
# Soustredeni
|
# Soustredeni
|
||||||
|
@ -58,9 +58,9 @@ urlpatterns = [
|
||||||
|
|
||||||
# Zadani
|
# Zadani
|
||||||
# path('zadani/aktualni/', views.AktualniZadaniView.as_view(), name='seminar_aktualni_zadani'),
|
# path('zadani/aktualni/', views.AktualniZadaniView.as_view(), name='seminar_aktualni_zadani'),
|
||||||
path('zadani/aktualni/', views.AktualniZadaniView, name='seminar_aktualni_zadani'),
|
path('aktualni/zadani/', views.AktualniZadaniView, name='seminar_aktualni_zadani'),
|
||||||
path('zadani/temata/', views.ZadaniTemataView, name='seminar_temata'),
|
#path('aktualni/temata/', views.ZadaniTemataView, name='seminar_temata'),
|
||||||
#path('zadani/vysledkova-listina/', views.ZadaniAktualniVysledkovkaView, name='seminar_vysledky'),
|
path('aktualni/vysledkova-listina/', views.ZadaniAktualniVysledkovkaView, name='seminar_vysledky'),
|
||||||
path('stare-novinky/', views.StareNovinkyView.as_view(), name='stare_novinky'),
|
path('stare-novinky/', views.StareNovinkyView.as_view(), name='stare_novinky'),
|
||||||
|
|
||||||
# Clanky
|
# Clanky
|
||||||
|
@ -132,16 +132,16 @@ urlpatterns = [
|
||||||
),
|
),
|
||||||
|
|
||||||
path('prihlaska/',views.prihlaskaView, name='seminar_prihlaska'),
|
path('prihlaska/',views.prihlaskaView, name='seminar_prihlaska'),
|
||||||
path('login/', views.LoginView.as_view(), name='login'),
|
path('prihlasit/', views.LoginView.as_view(), name='login'),
|
||||||
path('logout/', views.LogoutView.as_view(), name='logout'),
|
path('odhlasit/', views.LogoutView.as_view(), name='logout'),
|
||||||
path('resitel/', resitel_required(views.ResitelView.as_view()), name='seminar_resitel'),
|
path('resitel/', resitel_required(views.ResitelView.as_view()), name='seminar_resitel'),
|
||||||
path('reset_password/', views.PasswordResetView.as_view(), name='reset_password'),
|
path('reset-hesla/', views.PasswordResetView.as_view(), name='reset_password'),
|
||||||
path('change_password/', views.PasswordChangeView.as_view(), name='change_password'),
|
path('zmena-hesla/', views.PasswordChangeView.as_view(), name='change_password'),
|
||||||
path('reset_password_done/', views.PasswordResetDoneView.as_view(), name='reset_password_done'),
|
path('reset-hesla/2/', views.PasswordResetDoneView.as_view(), name='reset_password_done'),
|
||||||
path('reset_password_confirm/<uidb64>/<token>/', views.PasswordResetConfirmView.as_view(), name='password_reset_confirm'),
|
path('reset-hesla/potvrzeni/<uidb64>/<token>/', views.PasswordResetConfirmView.as_view(), name='password_reset_confirm'),
|
||||||
path('reset_password_complete/', views.PasswordResetCompleteView.as_view(), name='reset_password_complete'),
|
path('reset-hesla/hotovo/', views.PasswordResetCompleteView.as_view(), name='reset_password_complete'),
|
||||||
path(
|
path(
|
||||||
'resitel_edit',
|
'resitel/osobni-udaje/',
|
||||||
login_required(views.resitelEditView, login_url='/login/'),
|
login_required(views.resitelEditView, login_url='/login/'),
|
||||||
name='seminar_resitel_edit'
|
name='seminar_resitel_edit'
|
||||||
),
|
),
|
||||||
|
@ -150,9 +150,9 @@ urlpatterns = [
|
||||||
path('profil/', views.profilView, name='profil'),
|
path('profil/', views.profilView, name='profil'),
|
||||||
|
|
||||||
# Autocomplete
|
# Autocomplete
|
||||||
path('autocomplete/skola/',views.SkolaAutocomplete.as_view(), name='autocomplete_skola'),
|
path('api/autocomplete/skola/',views.SkolaAutocomplete.as_view(), name='autocomplete_skola'),
|
||||||
path('autocomplete/resitel/', org_required(views.ResitelAutocomplete.as_view()), name='autocomplete_resitel'),
|
path('api/autocomplete/resitel/', org_required(views.ResitelAutocomplete.as_view()), name='autocomplete_resitel'),
|
||||||
path('autocomplete/problem/odevzdatelny',views.OdevzdatelnyProblemAutocomplete.as_view(), name='autocomplete_problem_odevzdatelny'),
|
path('api/autocomplete/problem/odevzdatelny',views.OdevzdatelnyProblemAutocomplete.as_view(), name='autocomplete_problem_odevzdatelny'),
|
||||||
|
|
||||||
path('temp/add_solution', org_required(views.AddSolutionView.as_view()), name='seminar_vloz_reseni'),
|
path('temp/add_solution', org_required(views.AddSolutionView.as_view()), name='seminar_vloz_reseni'),
|
||||||
path('temp/nahraj_reseni', resitel_required(views.NahrajReseniView.as_view()), name='seminar_nahraj_reseni'),
|
path('temp/nahraj_reseni', resitel_required(views.NahrajReseniView.as_view()), name='seminar_nahraj_reseni'),
|
||||||
|
|
|
@ -487,29 +487,32 @@ def ZadaniTemataView(request):
|
||||||
# return render(request, 'seminar/tematka/rozcestnik.html', {"tematka": tematka, "rocnik" : nastaveni.aktualni_rocnik().rocnik})
|
# return render(request, 'seminar/tematka/rozcestnik.html', {"tematka": tematka, "rocnik" : nastaveni.aktualni_rocnik().rocnik})
|
||||||
#
|
#
|
||||||
|
|
||||||
#def ZadaniAktualniVysledkovkaView(request):
|
def ZadaniAktualniVysledkovkaView(request):
|
||||||
# nastaveni = get_object_or_404(Nastaveni)
|
nastaveni = get_object_or_404(Nastaveni)
|
||||||
# # Aktualni verejna vysledkovka
|
# Aktualni verejna vysledkovka
|
||||||
# vysledkovka = vysledkovka_rocniku(nastaveni.aktualni_rocnik)
|
vysledkovka = vysledkovka_rocniku(nastaveni.aktualni_rocnik)
|
||||||
# # kdyz neni verejna vysledkovka, tak zobraz starou
|
cisla = cisla_rocniku(nastaveni.aktualni_rocnik)
|
||||||
# if not vysledkovka:
|
# kdyz neni verejna vysledkovka, tak zobraz starou
|
||||||
# try:
|
if not vysledkovka:
|
||||||
# minuly_rocnik = Rocnik.objects.get(
|
try:
|
||||||
# prvni_rok=(nastaveni.aktualni_rocnik.prvni_rok-1))
|
minuly_rocnik = Rocnik.objects.get(
|
||||||
# vysledkovka = vysledkovka_rocniku(minuly_rocnik)
|
prvni_rok=(nastaveni.aktualni_rocnik.prvni_rok-1))
|
||||||
# except ObjectDoesNotExist:
|
vysledkovka = vysledkovka_rocniku(minuly_rocnik)
|
||||||
# pass
|
cisla = cisla_rocniku(minuly_rocnik)
|
||||||
# # vysledkovka s neverejnyma vysledkama
|
except ObjectDoesNotExist:
|
||||||
# vysledkovka_s_neverejnymi = vysledkovka_rocniku(nastaveni.aktualni_rocnik, jen_verejne=False)
|
pass
|
||||||
# return render(
|
# vysledkovka s neverejnyma vysledkama
|
||||||
# request,
|
vysledkovka_s_neverejnymi = vysledkovka_rocniku(nastaveni.aktualni_rocnik, jen_verejne=False)
|
||||||
# 'seminar/zadani/AktualniVysledkovka.html',
|
return render(
|
||||||
# {
|
request,
|
||||||
# 'nastaveni': nastaveni,
|
'seminar/zadani/AktualniVysledkovka.html',
|
||||||
# 'vysledkovka': vysledkovka,
|
{
|
||||||
# 'vysledkovka_s_neverejnymi': vysledkovka_s_neverejnymi,
|
'nastaveni': nastaveni,
|
||||||
# }
|
'radky_vysledkovky': vysledkovka,
|
||||||
# )
|
'cisla': cisla,
|
||||||
|
'vysledkovka_s_neverejnymi': vysledkovka_s_neverejnymi,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
### Titulni strana
|
### Titulni strana
|
||||||
|
|
Loading…
Reference in a new issue