|
|
@ -60,6 +60,10 @@ def create_test_data(): |
|
|
|
p = Problem.objects.create(autor = rnd.choice(orgs), cislo_zadani=cs[ci-2], cislo_reseni=cs[ci], |
|
|
|
opravovatel = rnd.choice(orgs), kod = str(pi), nazev = u'Dummy úloha %s-%s' % (seq[ci], seq[pi]), |
|
|
|
stav = Problem.STAV_ZADANY, typ = Problem.TYP_ULOHA, body = rnd.randint(1, 5)) |
|
|
|
p.text_problemu = (u"<p>Text problému <strong>%s.%s %s</strong><em> [id %d]</em> za %d body.</p>" % |
|
|
|
(p.cislo_zadani.kod(), p.kod, p.nazev, p.id, p.body)) |
|
|
|
p.text_problemu_org = u"<p><strong>Neveřejný</strong> text problému.</p>" |
|
|
|
p.save() |
|
|
|
|
|
|
|
for resi in range(rnd.randint(0, 7)): |
|
|
|
res = Reseni.objects.create(problem = p, resitel = rnd.choice(Resitel.objects.all()), |
|
|
|