Chybová hláška i pro stvrzenky
This commit is contained in:
		
							parent
							
								
									88ae103ec1
								
							
						
					
					
						commit
						a1000ad2bf
					
				
					 1 changed files with 9 additions and 0 deletions
				
			
		|  | @ -9,6 +9,7 @@ import tempfile | |||
| import shutil | ||||
| import subprocess | ||||
| from pathlib import Path | ||||
| import http | ||||
| 
 | ||||
| from seminar.views import obalkyView | ||||
| 
 | ||||
|  | @ -76,6 +77,14 @@ def soustredeniUcastniciExportView(request, soustredeni): | |||
| def soustredeniStvrzenkyView(request, soustredeni): | ||||
| 	soustredeni = get_object_or_404(Soustredeni, id=soustredeni) | ||||
| 	ucastnici = Resitel.objects.filter(soustredeni=soustredeni) | ||||
| 	if ucastnici.count() == 0: | ||||
| 		return HttpResponse( | ||||
| 			render(request, 'universal.html', { | ||||
| 				'title': 'Není pro koho vyrobit stvrzenky.', | ||||
| 				'text': 'Právě ses pokusil/a vygenerovat stvrzenky pro prázdnou množinu lidí. Můžeš to zkusit změnit, případně se zeptej webařů :-)', | ||||
| 				}), | ||||
| 			status=http.HTTPStatus.NOT_FOUND, | ||||
| 			) | ||||
| 	castka = Nastaveni.get_solo().cena_sous | ||||
| 	tex = render(request, 'soustredeni/stvrzenky.tex', {'ucastnici': ucastnici, 'soustredeni': soustredeni, 'castka': castka}).content | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Pavel "LEdoian" Turinsky
						Pavel "LEdoian" Turinsky