změny pouze v komentářích, odkomentovaná věc v urls.py, která nefunguje, ale nejde bez ní testovat archiv
This commit is contained in:
		
							parent
							
								
									efc76c7153
								
							
						
					
					
						commit
						5c97181062
					
				
					 2 changed files with 34 additions and 32 deletions
				
			
		|  | @ -23,7 +23,7 @@ urlpatterns = [ | |||
| 	path('archiv/temata/', views.ArchivTemataView.as_view()), | ||||
| 
 | ||||
| 	path('rocnik/<int:rocnik>/', views.RocnikView.as_view(), name='seminar_rocnik'), | ||||
| 	#path('cislo/<int:rocnik>.<int:cislo>/', views.CisloView.as_view(), name='seminar_cislo'), | ||||
| 	path('cislo/<int:rocnik>.<int:cislo>/', views.CisloView.as_view(), name='seminar_cislo'), # odkomentované jenom kvůli testování archivu | ||||
| 	path('problem/<int:pk>/', views.ProblemView.as_view(), name='seminar_problem'), | ||||
| 	#path('problem/(?P<pk>\d+)/(?P<prispevek>\d+)/', views.PrispevekView.as_view(), name='seminar_problem_prispevek'), | ||||
| 
 | ||||
|  |  | |||
|  | @ -311,7 +311,6 @@ class CojemamOrganizatoriStariView(generic.ListView): | |||
| 
 | ||||
| ### Archiv | ||||
| 
 | ||||
| 
 | ||||
| class ArchivView(generic.ListView): | ||||
| 	model = Rocnik | ||||
| 	template_name='seminar/archiv/cisla.html' | ||||
|  | @ -322,13 +321,16 @@ class ArchivView(generic.ListView): | |||
| 		vyska = 297  # px | ||||
| 		sirka = 210  # px | ||||
| 
 | ||||
| 		# nejnovějších 10 zveřejněných čísel | ||||
| 		cisla = Cislo.objects.filter(verejne_db=True)[:10] | ||||
| 
 | ||||
| 		# op = os.path, udělá z argumentů cestu | ||||
| 		png_dir = op.join(settings.MEDIA_ROOT, "cislo", "png") | ||||
| 
 | ||||
| 		# seznam [(url obrázku, číslo)] | ||||
| 		urls = [] | ||||
| 
 | ||||
| 		# c je číslo, i je pořadí čísla | ||||
| 		for i, c in enumerate(cisla): | ||||
| 			if not c.pdf: | ||||
| 				continue | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Kateřina Čížková
						Kateřina Čížková