|
@ -38,7 +38,7 @@ def nahled(request, pk, soustredeni): |
|
|
if not request.user.is_staff: |
|
|
if not request.user.is_staff: |
|
|
podgalerie = podgalerie.filter(zobrazit__lt=1) |
|
|
podgalerie = podgalerie.filter(zobrazit__lt=1) |
|
|
|
|
|
|
|
|
obrazky = Obrazek.objects.filter(galerie = galerie).order_by('poradi') |
|
|
obrazky = Obrazek.objects.filter(galerie = galerie).order_by('poradi', 'nazev') |
|
|
preview = zobrazit(galerie, request) |
|
|
preview = zobrazit(galerie, request) |
|
|
|
|
|
|
|
|
sourozenci = [] |
|
|
sourozenci = [] |
|
@ -82,7 +82,7 @@ def detail(request, pk, fotka, soustredeni): |
|
|
galerie = get_object_or_404(Galerie, pk=pk) |
|
|
galerie = get_object_or_404(Galerie, pk=pk) |
|
|
preview = zobrazit(galerie, request) |
|
|
preview = zobrazit(galerie, request) |
|
|
obrazek = get_object_or_404(Obrazek, pk=fotka) |
|
|
obrazek = get_object_or_404(Obrazek, pk=fotka) |
|
|
obrazky = galerie.obrazek_set.all().order_by('poradi') |
|
|
obrazky = galerie.obrazek_set.all().order_by('poradi', 'nazev') |
|
|
|
|
|
|
|
|
# vytvoreni a obslouzeni formulare |
|
|
# vytvoreni a obslouzeni formulare |
|
|
if request.method == 'POST': |
|
|
if request.method == 'POST': |
|
|