From 40950742252be9f365a90e45ec3b2d526ca44a18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Canek=20Pel=C3=A1ez=20Vald=C3=A9s?= Date: Mon, 15 Nov 2021 03:07:49 -0600 Subject: [PATCH] Fix bug where up was used before defining it. --- fotos/views.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fotos/views.py b/fotos/views.py index 3428dc6..e50ca80 100644 --- a/fotos/views.py +++ b/fotos/views.py @@ -880,6 +880,13 @@ def event(request, year, month, event): PREFIX + '/admin/delete?' + urlencode({'path': path})) + highlight_url = PREFIX + '/admin/highlight?' + urlencode({'path': path}) + highlight = ea.the_photo + up = ma.get_url_path() + page = request.GET.get('page', 1) + paginator = Paginator(photos, PAGINATION_ITEMS) + the_page = paginator.get_page(page) + events = _get_events(ma) i = 0 while ea != events[i]: @@ -888,13 +895,6 @@ def event(request, year, month, event): if up_page > 1: up += '?page=%d' % up_page - highlight_url = PREFIX + '/admin/highlight?' + urlencode({'path': path}) - highlight = ea.the_photo - up = ma.get_url_path() - page = request.GET.get('page', 1) - paginator = Paginator(photos, PAGINATION_ITEMS) - the_page = paginator.get_page(page) - attrs = { 'album': ea, 'breadcrumbs': [{ 'link': ya.get_url_path(), 'name': ya.name }, -- GitLab