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 %}
|
||||
</h1>
|
||||
|
||||
{% if vysledkovka %}
|
||||
{% if radky_vysledkovky %}
|
||||
{% include "seminar/vysledkovka_rocnik.html" %}
|
||||
{% else %}
|
||||
<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 %}
|
||||
<div class='mam-org-only'>
|
||||
<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" %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
|
|
|
@ -9,8 +9,8 @@ urlpatterns = [
|
|||
# path('<int:rocnik>/t<int:tematko>/', views.TematkoView),
|
||||
|
||||
# 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'),
|
||||
path('o-nas/organizatori/', views.CojemamOrganizatoriView.as_view(), name='organizatori'),
|
||||
path('o-nas/organizatori/organizovali/', views.CojemamOrganizatoriStariView.as_view(), name='stari_organizatori'),
|
||||
|
||||
# Archiv
|
||||
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('cislo/<int:rocnik>.<str:cislo>/', views.CisloView.as_view(), name='seminar_cislo'),
|
||||
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>/json/', views.TreeNodeJSONView.as_view(), name='seminar_treenode_json'),
|
||||
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/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/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/sirotcinec/', views.SirotcinecView.as_view(), name='seminar_treenode_sirotcinec'),
|
||||
#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/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/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/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/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'),
|
||||
|
||||
# Soustredeni
|
||||
|
@ -58,9 +58,9 @@ urlpatterns = [
|
|||
|
||||
# Zadani
|
||||
# path('zadani/aktualni/', views.AktualniZadaniView.as_view(), name='seminar_aktualni_zadani'),
|
||||
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('aktualni/zadani/', views.AktualniZadaniView, name='seminar_aktualni_zadani'),
|
||||
#path('aktualni/temata/', views.ZadaniTemataView, name='seminar_temata'),
|
||||
path('aktualni/vysledkova-listina/', views.ZadaniAktualniVysledkovkaView, name='seminar_vysledky'),
|
||||
path('stare-novinky/', views.StareNovinkyView.as_view(), name='stare_novinky'),
|
||||
|
||||
# Clanky
|
||||
|
@ -132,16 +132,16 @@ urlpatterns = [
|
|||
),
|
||||
|
||||
path('prihlaska/',views.prihlaskaView, name='seminar_prihlaska'),
|
||||
path('login/', views.LoginView.as_view(), name='login'),
|
||||
path('logout/', views.LogoutView.as_view(), name='logout'),
|
||||
path('prihlasit/', views.LoginView.as_view(), name='login'),
|
||||
path('odhlasit/', views.LogoutView.as_view(), name='logout'),
|
||||
path('resitel/', resitel_required(views.ResitelView.as_view()), name='seminar_resitel'),
|
||||
path('reset_password/', views.PasswordResetView.as_view(), name='reset_password'),
|
||||
path('change_password/', views.PasswordChangeView.as_view(), name='change_password'),
|
||||
path('reset_password_done/', views.PasswordResetDoneView.as_view(), name='reset_password_done'),
|
||||
path('reset_password_confirm/<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/', views.PasswordResetView.as_view(), name='reset_password'),
|
||||
path('zmena-hesla/', views.PasswordChangeView.as_view(), name='change_password'),
|
||||
path('reset-hesla/2/', views.PasswordResetDoneView.as_view(), name='reset_password_done'),
|
||||
path('reset-hesla/potvrzeni/<uidb64>/<token>/', views.PasswordResetConfirmView.as_view(), name='password_reset_confirm'),
|
||||
path('reset-hesla/hotovo/', views.PasswordResetCompleteView.as_view(), name='reset_password_complete'),
|
||||
path(
|
||||
'resitel_edit',
|
||||
'resitel/osobni-udaje/',
|
||||
login_required(views.resitelEditView, login_url='/login/'),
|
||||
name='seminar_resitel_edit'
|
||||
),
|
||||
|
@ -150,9 +150,9 @@ urlpatterns = [
|
|||
path('profil/', views.profilView, name='profil'),
|
||||
|
||||
# Autocomplete
|
||||
path('autocomplete/skola/',views.SkolaAutocomplete.as_view(), name='autocomplete_skola'),
|
||||
path('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/skola/',views.SkolaAutocomplete.as_view(), name='autocomplete_skola'),
|
||||
path('api/autocomplete/resitel/', org_required(views.ResitelAutocomplete.as_view()), name='autocomplete_resitel'),
|
||||
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/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})
|
||||
#
|
||||
|
||||
#def ZadaniAktualniVysledkovkaView(request):
|
||||
# nastaveni = get_object_or_404(Nastaveni)
|
||||
# # Aktualni verejna vysledkovka
|
||||
# vysledkovka = vysledkovka_rocniku(nastaveni.aktualni_rocnik)
|
||||
# # kdyz neni verejna vysledkovka, tak zobraz starou
|
||||
# if not vysledkovka:
|
||||
# try:
|
||||
# minuly_rocnik = Rocnik.objects.get(
|
||||
# prvni_rok=(nastaveni.aktualni_rocnik.prvni_rok-1))
|
||||
# vysledkovka = vysledkovka_rocniku(minuly_rocnik)
|
||||
# except ObjectDoesNotExist:
|
||||
# pass
|
||||
# # vysledkovka s neverejnyma vysledkama
|
||||
# vysledkovka_s_neverejnymi = vysledkovka_rocniku(nastaveni.aktualni_rocnik, jen_verejne=False)
|
||||
# return render(
|
||||
# request,
|
||||
# 'seminar/zadani/AktualniVysledkovka.html',
|
||||
# {
|
||||
# 'nastaveni': nastaveni,
|
||||
# 'vysledkovka': vysledkovka,
|
||||
# 'vysledkovka_s_neverejnymi': vysledkovka_s_neverejnymi,
|
||||
# }
|
||||
# )
|
||||
def ZadaniAktualniVysledkovkaView(request):
|
||||
nastaveni = get_object_or_404(Nastaveni)
|
||||
# Aktualni verejna vysledkovka
|
||||
vysledkovka = vysledkovka_rocniku(nastaveni.aktualni_rocnik)
|
||||
cisla = cisla_rocniku(nastaveni.aktualni_rocnik)
|
||||
# kdyz neni verejna vysledkovka, tak zobraz starou
|
||||
if not vysledkovka:
|
||||
try:
|
||||
minuly_rocnik = Rocnik.objects.get(
|
||||
prvni_rok=(nastaveni.aktualni_rocnik.prvni_rok-1))
|
||||
vysledkovka = vysledkovka_rocniku(minuly_rocnik)
|
||||
cisla = cisla_rocniku(minuly_rocnik)
|
||||
except ObjectDoesNotExist:
|
||||
pass
|
||||
# vysledkovka s neverejnyma vysledkama
|
||||
vysledkovka_s_neverejnymi = vysledkovka_rocniku(nastaveni.aktualni_rocnik, jen_verejne=False)
|
||||
return render(
|
||||
request,
|
||||
'seminar/zadani/AktualniVysledkovka.html',
|
||||
{
|
||||
'nastaveni': nastaveni,
|
||||
'radky_vysledkovky': vysledkovka,
|
||||
'cisla': cisla,
|
||||
'vysledkovka_s_neverejnymi': vysledkovka_s_neverejnymi,
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
### Titulni strana
|
||||
|
|
Loading…
Reference in a new issue