|
|
@ -23,7 +23,7 @@ def gen_osoby(rnd, size): |
|
|
|
'Pokora', 'Koch', 'Szegedy', 'Rudý', "von Neumann", "d'Este"] |
|
|
|
prijmeni_f = ['Novotná', 'Svobodová', 'Machová', 'Zelená', 'Yu-Xin', 'Mlsná', 'Dubná', |
|
|
|
'Mrkvová', 'Suchá', 'Lovelace', 'Holcová', 'Rui'] |
|
|
|
prezdivka = ['Kaki', 'Hurdur', 'Maracuja', 'Bobbo', "", "", "", "", "", |
|
|
|
prezdivky = ['Kaki', 'Hurdur', 'Maracuja', 'Bobbo', "", "", "", "", "", |
|
|
|
"", "", 'Riki', 'Sapa', "", '', '---', 'Koko'] |
|
|
|
domain = ['example.com', 'dolujeme.eu', 'mff.cuni.cz', 'strcprstskrzkrk.cz', |
|
|
|
'british.co.uk', 'splachni.to', 'haha.org'] |
|
|
@ -42,16 +42,16 @@ def gen_osoby(rnd, size): |
|
|
|
pohlavi = rnd.randint(0,1) |
|
|
|
jmeno = rnd.choice([jmena_m, jmena_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)]) |
|
|
|
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), |
|
|
|
rnd.randint(1, 28)) |
|
|
|
ulic = rnd.choice(seznam_ulic) |
|
|
|
cp = rnd.randint(1, 99) |
|
|
|
ulice = " ".join([ulic, str(cp)]) |
|
|
|
mesto = rnd.choice([seznam_mest]) |
|
|
|
psc = [rnd.choice([k for k in range(10)]) for i in range(6)] |
|
|
|
mesto = rnd.choice(seznam_mest) |
|
|
|
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, |
|
|
|
prezdivka = prezdivka, pohlavi_muz = pohlavi, email = email, |
|
|
|
telefon = telefon, datum_narozeni = narozeni, ulice = ulice, |
|
|
|