diff --git a/vyroba_problemu/snippet_z_Gimliho.py b/vyroba_problemu/snippet_z_Gimliho.py new file mode 100644 index 00000000..cc79d81b --- /dev/null +++ b/vyroba_problemu/snippet_z_Gimliho.py @@ -0,0 +1,20 @@ +with transaction.atomic(): + assert t.id == 2365 + pfx = f"{t.nazev}, " + # Problémy + for k, b in [(4,3)]: + u = m.Uloha.objects.create( + nadproblem=t, + nazev=pfx + f"{'úloha' if b is not None else 'problém'} {k}", + autor=t.autor, + garant=t.garant, + max_body=b, + cislo_zadani=m.Cislo.get(28, 5), + kod=k, + stav=m.Problem.STAV_ZADANY, + ) + u.opravovatele.set(t.opravovatele.all()) + print(u, u.max_body) + input("rly?") + +