|
@ -17,6 +17,17 @@ class SoustredeniListView(generic.ListView): |
|
|
model = Soustredeni |
|
|
model = Soustredeni |
|
|
template_name = 'soustredeni/seznam_soustredeni.html' |
|
|
template_name = 'soustredeni/seznam_soustredeni.html' |
|
|
|
|
|
|
|
|
|
|
|
def get_queryset(self): |
|
|
|
|
|
return ( |
|
|
|
|
|
Soustredeni.objects |
|
|
|
|
|
.prefetch_related( |
|
|
|
|
|
"ucastnici", "ucastnici__osoba", |
|
|
|
|
|
"organizatori", "organizatori__osoba", |
|
|
|
|
|
"galerie_set" |
|
|
|
|
|
) |
|
|
|
|
|
.select_related("rocnik") |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def soustredeniObalkyView(request, soustredeni): |
|
|
def soustredeniObalkyView(request, soustredeni): |
|
|
soustredeni = get_object_or_404(Soustredeni, id=soustredeni) |
|
|
soustredeni = get_object_or_404(Soustredeni, id=soustredeni) |
|
|