Testdata: oprava odsazení
This commit is contained in:
parent
1ed4d121ae
commit
d14366d38e
1 changed files with 21 additions and 21 deletions
|
@ -219,27 +219,27 @@ def gen_ulohy_do_cisla(rnd, organizatori, resitele, rocnik_cisla, rocniky, size)
|
|||
return
|
||||
|
||||
def gen_soustredeni(rnd, resitele, organizatori):
|
||||
soustredeni = []
|
||||
for _ in range(1, 10): #FIXME Tu range si změňte jak chcete, nevím, co přesně znamená size (asi Anet?)
|
||||
datum_zacatku=datetime.date(rnd.randint(2000, 2020), rnd.randint(1, 12), rnd.randint(1, 28))
|
||||
working_sous = Soustredeni.objects.create(
|
||||
rocnik=Rocnik.objects.order_by('?').first(),
|
||||
verejne_db=rnd.choice([True, False]),
|
||||
misto=rnd.choice(['Kremrolovice', 'Indiánov', 'U zmzliny', 'Vafláreň', 'Větrník', 'Horní Rakvička', 'Dolní cheesecake']),
|
||||
typ=rnd.choice(['jarni', 'podzimni', 'vikend']),
|
||||
datum_zacatku=datum_zacatku,
|
||||
datum_konce=datum_zacatku + datetime.timedelta(days=7))
|
||||
ucastnici = rnd.sample(resitele, min(len(resitele), 20))
|
||||
working_sous.ucastnici.set(ucastnici)
|
||||
#for res in rnd.sample(resitele, min(len(resitele), 20)):
|
||||
# Soustredeni_Ucastnici.objects.create(resitel=res, soutredeni=working_sous)
|
||||
orgove_vyber = rnd.sample(organizatori, min(len(organizatori), 20))
|
||||
working_sous.organizatori.set(orgove_vyber)
|
||||
#for org in rnd.sample(organizatori, min(len(organizatori), 20)):
|
||||
# Soustredeni_Organizatori.objects.create(organizator=org, soutredeni=working_sous)
|
||||
working_sous.save()
|
||||
soustredeni.append(working_sous)
|
||||
return soustredeni
|
||||
soustredeni = []
|
||||
for _ in range(1, 10): #FIXME Tu range si změňte jak chcete, nevím, co přesně znamená size (asi Anet?)
|
||||
datum_zacatku=datetime.date(rnd.randint(2000, 2020), rnd.randint(1, 12), rnd.randint(1, 28))
|
||||
working_sous = Soustredeni.objects.create(
|
||||
rocnik=Rocnik.objects.order_by('?').first(),
|
||||
verejne_db=rnd.choice([True, False]),
|
||||
misto=rnd.choice(['Kremrolovice', 'Indiánov', 'U zmzliny', 'Vafláreň', 'Větrník', 'Horní Rakvička', 'Dolní cheesecake']),
|
||||
typ=rnd.choice(['jarni', 'podzimni', 'vikend']),
|
||||
datum_zacatku=datum_zacatku,
|
||||
datum_konce=datum_zacatku + datetime.timedelta(days=7))
|
||||
ucastnici = rnd.sample(resitele, min(len(resitele), 20))
|
||||
working_sous.ucastnici.set(ucastnici)
|
||||
#for res in rnd.sample(resitele, min(len(resitele), 20)):
|
||||
# Soustredeni_Ucastnici.objects.create(resitel=res, soutredeni=working_sous)
|
||||
orgove_vyber = rnd.sample(organizatori, min(len(organizatori), 20))
|
||||
working_sous.organizatori.set(orgove_vyber)
|
||||
#for org in rnd.sample(organizatori, min(len(organizatori), 20)):
|
||||
# Soustredeni_Organizatori.objects.create(organizator=org, soutredeni=working_sous)
|
||||
working_sous.save()
|
||||
soustredeni.append(working_sous)
|
||||
return soustredeni
|
||||
|
||||
def gen_rocniky(last_rocnik, size):
|
||||
rocniky = []
|
||||
|
|
Loading…
Reference in a new issue