Ještě status kód
This commit is contained in:
		
							parent
							
								
									d2926bd1a7
								
							
						
					
					
						commit
						4ecd2a7a61
					
				
					 1 changed files with 9 additions and 4 deletions
				
			
		|  | @ -37,6 +37,7 @@ import unicodedata | |||
| import logging | ||||
| import time | ||||
| from collections.abc import Sequence | ||||
| import http | ||||
| 
 | ||||
| from seminar.utils import aktivniResitele | ||||
| 
 | ||||
|  | @ -564,10 +565,14 @@ def cisloObalkyView(request, rocnik, cislo): | |||
| 
 | ||||
| def obalkyView(request, resitele): | ||||
| 	if len(resitele) == 0: | ||||
| 		return render(request, 'universal.html', { | ||||
| 			'title': 'Není pro koho vyrobit obálky.', | ||||
| 			'text': 'Právě ses pokusil/a vygenerovat obálky pro prázdnou množinu lidí. Můžeš to zkusit změnit, případně se zeptej webařů :-)', | ||||
| 			}) | ||||
| 		return HttpResponse( | ||||
| 			render(request, 'universal.html', { | ||||
| 				'title': 'Není pro koho vyrobit obálky.', | ||||
| 				'text': 'Právě ses pokusil/a vygenerovat obálky pro prázdnou množinu lidí. Můžeš to zkusit změnit, případně se zeptej webařů :-)', | ||||
| 				}), | ||||
| 			status=http.HTTPStatus.NOT_FOUND, | ||||
| 			) | ||||
| 
 | ||||
| 	tex = render(request,'seminar/archiv/obalky.tex', {'resitele': resitele}).content | ||||
| 
 | ||||
| 	tempdir = tempfile.mkdtemp() | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Pavel "LEdoian" Turinsky
						Pavel "LEdoian" Turinsky