testutils.py: mezery na tabulátory
This commit is contained in:
		
							parent
							
								
									73a997956c
								
							
						
					
					
						commit
						20b7062cf0
					
				
					 1 changed files with 35 additions and 35 deletions
				
			
		|  | @ -60,7 +60,7 @@ def gen_osoby(rnd, size): | |||
| 				datum_registrace = datetime.date(rnd.randint(2019, 2029),  | ||||
| 					rnd.randint(1, 12), rnd.randint(1, 28)))) | ||||
| 		#TODO pridat foto male a velke. Jak? | ||||
|                 # Pavel tvrdí, že to necháme a přidáme až do adminu | ||||
| 				# Pavel tvrdí, že to necháme a přidáme až do adminu | ||||
| 
 | ||||
| 	return osoby | ||||
| 	 | ||||
|  | @ -208,23 +208,23 @@ def gen_ulohy_do_cisla(rnd, cislo, organizatori, resitele, slovnik_cisel, 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)) | ||||
|             for res in rnd.sample(resitele, min(len(resitele), 20)): | ||||
|                 Soustredeni_Ucastnici.objects.create(resitel=res, soutredeni=working_sous) | ||||
|             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)) | ||||
| 			for res in rnd.sample(resitele, min(len(resitele), 20)): | ||||
| 				Soustredeni_Ucastnici.objects.create(resitel=res, soutredeni=working_sous) | ||||
| 			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 = [] | ||||
|  | @ -237,24 +237,24 @@ def gen_rocniky(last_rocnik, size): | |||
| 	return rocniky | ||||
| 
 | ||||
| def gen_konfery(rnd, reseni, organizatori, ucastnici, soustredeni): | ||||
|     konfery = [] | ||||
|     for _ in range(1, size): #FIXME Tu range si změňte jak chcete, nevím, co přesně znamená size (asi Anet?)  | ||||
|         konfera = Konfera.objects.create( | ||||
|             nazev=rnd.choice(['Pozorování', 'Zkoumání', 'Modelování', 'Počítání', 'Zkoušení']) + rnd.choice([' vlastností', ' jevů', ' charakteristik']) + rnd.choice([' vektorových prostorů', ' kinetické terorie látek', ' molekulární biologie', ' syntentických stromů']), | ||||
|             anotace=lorem.paragraph(), | ||||
|             abstrakt=lorem.paragraph(), | ||||
|             organizator=rnd.choice(organizatori), | ||||
|             soustredeni=rnd.choice(soustredeni), | ||||
|             reseni=rnd.choice(reseni), | ||||
|             typ_prezentace=rnd.choice(['veletrh', 'prezentace'])) | ||||
|         for res in rnd.sample(ucastnici, min(len(ucastnici), rnd.randint(3, 6))): | ||||
|             Konfery_Ucastnici.objects.create(resitel=res, konfera=konfera) | ||||
|         konfery.append(konfera) | ||||
|         konfera.save() | ||||
| 	konfery = [] | ||||
| 	for _ in range(1, size): #FIXME Tu range si změňte jak chcete, nevím, co přesně znamená size (asi Anet?)  | ||||
| 		konfera = Konfera.objects.create( | ||||
| 			nazev=rnd.choice(['Pozorování', 'Zkoumání', 'Modelování', 'Počítání', 'Zkoušení']) + rnd.choice([' vlastností', ' jevů', ' charakteristik']) + rnd.choice([' vektorových prostorů', ' kinetické terorie látek', ' molekulární biologie', ' syntentických stromů']), | ||||
| 			anotace=lorem.paragraph(), | ||||
| 			abstrakt=lorem.paragraph(), | ||||
| 			organizator=rnd.choice(organizatori), | ||||
| 			soustredeni=rnd.choice(soustredeni), | ||||
| 			reseni=rnd.choice(reseni), | ||||
| 			typ_prezentace=rnd.choice(['veletrh', 'prezentace'])) | ||||
| 		for res in rnd.sample(ucastnici, min(len(ucastnici), rnd.randint(3, 6))): | ||||
| 			Konfery_Ucastnici.objects.create(resitel=res, konfera=konfera) | ||||
| 		konfery.append(konfera) | ||||
| 		konfera.save() | ||||
| 
 | ||||
|         konferanode = KonferaNode.objects.create(konfera=konfera) | ||||
|         konferanode.save() | ||||
|     return konfery | ||||
| 		konferanode = KonferaNode.objects.create(konfera=konfera) | ||||
| 		konferanode.save() | ||||
| 	return konfery | ||||
| 
 | ||||
| def gen_cisla(rocniky): | ||||
| 	slovnik_rocnik_cisla = {} | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Tomáš Domes
						Tomáš Domes