From 66715166d494e71d2ae0ce027c3e0bb19d92e22c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Domes?= Date: Wed, 6 Mar 2019 00:19:47 +0100 Subject: [PATCH] galerie/views.py: oprava sorteni obrazku --- galerie/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/galerie/views.py b/galerie/views.py index 46860810..f7ace3c8 100644 --- a/galerie/views.py +++ b/galerie/views.py @@ -38,7 +38,7 @@ def nahled(request, pk, soustredeni): if not request.user.is_staff: podgalerie = podgalerie.filter(zobrazit__lt=1) - obrazky = Obrazek.objects.filter(galerie = galerie) + obrazky = Obrazek.objects.filter(galerie = galerie).order_by('poradi') preview = zobrazit(galerie, request) sourozenci = [] @@ -82,7 +82,7 @@ def detail(request, pk, fotka, soustredeni): galerie = get_object_or_404(Galerie, pk=pk) preview = zobrazit(galerie, request) obrazek = get_object_or_404(Obrazek, pk=fotka) - obrazky = galerie.obrazek_set.all() + obrazky = galerie.obrazek_set.all().order_by('poradi') # vytvoreni a obslouzeni formulare if request.method == 'POST':