tituly | oprava ziskavani titulu
This commit is contained in:
		
							parent
							
								
									8b3073a4f6
								
							
						
					
					
						commit
						c83e355efd
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		|  | @ -384,13 +384,16 @@ def obalkyView(request,resitele): | ||||||
| 
 | 
 | ||||||
| ### Tituly | ### Tituly | ||||||
| 
 | 
 | ||||||
|  | # TODO udelat neco jako get_objects_or_404 | ||||||
| def TitulyView(request, rocnik, cislo): | def TitulyView(request, rocnik, cislo): | ||||||
|     rocnik_obj = Rocnik.objects.filter(rocnik = rocnik).first() |     rocnik_obj = Rocnik.objects.filter(rocnik = rocnik).first() | ||||||
|     resitele = Resitel.objects.filter(rok_maturity__gte = rocnik_obj.prvni_rok) |     resitele = Resitel.objects.filter(rok_maturity__gte = rocnik_obj.prvni_rok) | ||||||
|     cislo_obj = Cislo.objects.filter(rocnik = rocnik_obj, cislo = cislo).first() |     cislo_obj = Cislo.objects.filter(rocnik = rocnik_obj, cislo = cislo).first() | ||||||
| 
 | 
 | ||||||
|     for resitel in resitele: |     for resitel in resitele: | ||||||
|         vys = VysledkyKCisluOdjakziva.objects.filter(resitel = resitele, cislo = cislo_obj).first() |         rocnik_obj = Rocnik.objects.filter(rocnik = rocnik) | ||||||
|  |         cislo_obj = Cislo.objects.filter(rocnik = rocnik_obj, cislo = cislo).first() | ||||||
|  |         vys = VysledkyKCisluOdjakziva.objects.filter(resitel = resitel, cislo = cislo_obj).first() | ||||||
|         if vys == None: |         if vys == None: | ||||||
|             body = 0 |             body = 0 | ||||||
|         else:  |         else:  | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Bc. Petr Pecha
						Bc. Petr Pecha