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 logging | ||||||
| import time | import time | ||||||
| from collections.abc import Sequence | from collections.abc import Sequence | ||||||
|  | import http | ||||||
| 
 | 
 | ||||||
| from seminar.utils import aktivniResitele | from seminar.utils import aktivniResitele | ||||||
| 
 | 
 | ||||||
|  | @ -564,10 +565,14 @@ def cisloObalkyView(request, rocnik, cislo): | ||||||
| 
 | 
 | ||||||
| def obalkyView(request, resitele): | def obalkyView(request, resitele): | ||||||
| 	if len(resitele) == 0: | 	if len(resitele) == 0: | ||||||
| 		return render(request, 'universal.html', { | 		return HttpResponse( | ||||||
| 			'title': 'Není pro koho vyrobit obálky.', | 			render(request, 'universal.html', { | ||||||
| 			'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řů :-)', | 				'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 | 	tex = render(request,'seminar/archiv/obalky.tex', {'resitele': resitele}).content | ||||||
| 
 | 
 | ||||||
| 	tempdir = tempfile.mkdtemp() | 	tempdir = tempfile.mkdtemp() | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Pavel "LEdoian" Turinsky
						Pavel "LEdoian" Turinsky