|
@ -72,16 +72,16 @@ def pokacej_les(apps, schema_editor): |
|
|
pohadky_pred = Pohadka.objects.filter(uloha_old = u.problem, pred = True) |
|
|
pohadky_pred = Pohadka.objects.filter(uloha_old = u.problem, pred = True) |
|
|
pohadky_po = Pohadka.objects.filter(uloha_old = u.problem, pred = False) |
|
|
pohadky_po = Pohadka.objects.filter(uloha_old = u.problem, pred = False) |
|
|
for p in pohadky_pred: |
|
|
for p in pohadky_pred: |
|
|
# FIXME: Chceme pohádku do stromu? |
|
|
pnode = p.pohadkanode |
|
|
print('!!! !!! !!! !!! !!!') |
|
|
pridej_potomka(cnode, pnode) |
|
|
print('FIXME: Jak uložit pohádku??') |
|
|
|
|
|
print('!!! !!! !!! !!! !!!') |
|
|
|
|
|
pridej_potomka(cnode, unode) |
|
|
pridej_potomka(cnode, unode) |
|
|
for p in pohadky_po: |
|
|
for p in pohadky_po: |
|
|
# FIXME: Chceme pohádku do stromu? |
|
|
pnode = p.pohadkanode |
|
|
print('!!! !!! !!! !!! !!!') |
|
|
pridej_potomka(cnode, pnode) |
|
|
print('FIXME: Jak uložit pohádku??') |
|
|
|
|
|
print('!!! !!! !!! !!! !!!') |
|
|
# Pohádky, které nejsou u úlohy jsou špatně: |
|
|
|
|
|
if Pohadka.objects.exclude(uloha_old__typ='uloha').count(): |
|
|
|
|
|
raise ValueError("Existuje pohádka, která není u úlohy") |
|
|
|
|
|
|
|
|
# Články |
|
|
# Články |
|
|
for cl in Clanek.objects.filter(cislo = c).order_by('kod'): |
|
|
for cl in Clanek.objects.filter(cislo = c).order_by('kod'): |
|
|