Zrychlení načítání archivu soustředění pro účastníky
This commit is contained in:
		
							parent
							
								
									a72435dd72
								
							
						
					
					
						commit
						c130ab8426
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -18,12 +18,14 @@ class SoustredeniListView(generic.ListView): | |||
| 	template_name = 'soustredeni/seznam_soustredeni.html' | ||||
| 
 | ||||
| 	def get_queryset(self): | ||||
| 		if not self.request.user.je_org: | ||||
| 			return super().get_queryset() | ||||
| 		return ( | ||||
| 			Soustredeni.objects | ||||
| 			.prefetch_related( | ||||
| 				"ucastnici", "ucastnici__osoba", | ||||
| 				"organizatori", "organizatori__osoba", | ||||
| 				"galerie_set" | ||||
| 				"galerie_set", | ||||
| 			) | ||||
| 			.select_related("rocnik") | ||||
| 		) | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue