opravení testdat psč, telefon, přezdívka, město
This commit is contained in:
parent
2ad3c425f7
commit
4836d10493
1 changed files with 5 additions and 5 deletions
|
@ -23,7 +23,7 @@ def gen_osoby(rnd, size):
|
||||||
'Pokora', 'Koch', 'Szegedy', 'Rudý', "von Neumann", "d'Este"]
|
'Pokora', 'Koch', 'Szegedy', 'Rudý', "von Neumann", "d'Este"]
|
||||||
prijmeni_f = ['Novotná', 'Svobodová', 'Machová', 'Zelená', 'Yu-Xin', 'Mlsná', 'Dubná',
|
prijmeni_f = ['Novotná', 'Svobodová', 'Machová', 'Zelená', 'Yu-Xin', 'Mlsná', 'Dubná',
|
||||||
'Mrkvová', 'Suchá', 'Lovelace', 'Holcová', 'Rui']
|
'Mrkvová', 'Suchá', 'Lovelace', 'Holcová', 'Rui']
|
||||||
prezdivka = ['Kaki', 'Hurdur', 'Maracuja', 'Bobbo', "", "", "", "", "",
|
prezdivky = ['Kaki', 'Hurdur', 'Maracuja', 'Bobbo', "", "", "", "", "",
|
||||||
"", "", 'Riki', 'Sapa', "", '', '---', 'Koko']
|
"", "", 'Riki', 'Sapa', "", '', '---', 'Koko']
|
||||||
domain = ['example.com', 'dolujeme.eu', 'mff.cuni.cz', 'strcprstskrzkrk.cz',
|
domain = ['example.com', 'dolujeme.eu', 'mff.cuni.cz', 'strcprstskrzkrk.cz',
|
||||||
'british.co.uk', 'splachni.to', 'haha.org']
|
'british.co.uk', 'splachni.to', 'haha.org']
|
||||||
|
@ -42,16 +42,16 @@ def gen_osoby(rnd, size):
|
||||||
pohlavi = rnd.randint(0,1)
|
pohlavi = rnd.randint(0,1)
|
||||||
jmeno = rnd.choice([jmena_m, jmena_f][pohlavi])
|
jmeno = rnd.choice([jmena_m, jmena_f][pohlavi])
|
||||||
prijmeni = rnd.choice([prijmeni_m, prijmeni_f][pohlavi])
|
prijmeni = rnd.choice([prijmeni_m, prijmeni_f][pohlavi])
|
||||||
prezdivka = rnd.choice([prezdivka])
|
prezdivka = rnd.choice(prezdivky)
|
||||||
email = "@".join([unidecode.unidecode(jmeno), rnd.choice(domain)])
|
email = "@".join([unidecode.unidecode(jmeno), rnd.choice(domain)])
|
||||||
telefon = [rnd.choice([k for k in range(10)]) for i in range(10)]
|
telefon = "".join([str(rnd.choice([k for k in range(10)])) for i in range(9)])
|
||||||
narozeni = datetime.date(rnd.randint(1980, 2020), rnd.randint(1, 12),
|
narozeni = datetime.date(rnd.randint(1980, 2020), rnd.randint(1, 12),
|
||||||
rnd.randint(1, 28))
|
rnd.randint(1, 28))
|
||||||
ulic = rnd.choice(seznam_ulic)
|
ulic = rnd.choice(seznam_ulic)
|
||||||
cp = rnd.randint(1, 99)
|
cp = rnd.randint(1, 99)
|
||||||
ulice = " ".join([ulic, str(cp)])
|
ulice = " ".join([ulic, str(cp)])
|
||||||
mesto = rnd.choice([seznam_mest])
|
mesto = rnd.choice(seznam_mest)
|
||||||
psc = [rnd.choice([k for k in range(10)]) for i in range(6)]
|
psc = "".join([str(rnd.choice([k for k in range(10)])) for i in range(5)])
|
||||||
osoby.append(Osoba.objects.create(jmeno = jmeno, prijmeni = prijmeni,
|
osoby.append(Osoba.objects.create(jmeno = jmeno, prijmeni = prijmeni,
|
||||||
prezdivka = prezdivka, pohlavi_muz = pohlavi, email = email,
|
prezdivka = prezdivka, pohlavi_muz = pohlavi, email = email,
|
||||||
telefon = telefon, datum_narozeni = narozeni, ulice = ulice,
|
telefon = telefon, datum_narozeni = narozeni, ulice = ulice,
|
||||||
|
|
Loading…
Reference in a new issue