From a7a0a535382be1fd706c3faca3a81201978ba587 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Thu, 1 Dec 2022 15:44:35 +0100 Subject: [PATCH 1/1] Basic picture lists. --- src/catalogue/templates/catalogue/2022/author_detail.html | 2 ++ src/picture/views.py | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/catalogue/templates/catalogue/2022/author_detail.html b/src/catalogue/templates/catalogue/2022/author_detail.html index c063d9e9b..54486fbb5 100644 --- a/src/catalogue/templates/catalogue/2022/author_detail.html +++ b/src/catalogue/templates/catalogue/2022/author_detail.html @@ -71,6 +71,7 @@ + {% if tags %}
{% with author=tags.0 %} @@ -94,4 +95,5 @@ {% endif %}
+ {% endif %} {% endblock %} diff --git a/src/picture/views.py b/src/picture/views.py index e742c1542..194bb9820 100644 --- a/src/picture/views.py +++ b/src/picture/views.py @@ -17,7 +17,12 @@ def picture_list_thumb(request, filter=None, get_filter=None, template_name='pic pictures = pictures.filter(filter) if get_filter: pictures = pictures.filter(get_filter()) - return render(request, template_name, {'picture_list': list(pictures)}) + + if request.EXPERIMENTS['layout'].value: + template_name = 'catalogue/2022/author_detail.html' + return render(request, template_name, {'object_list': pictures}) + else: + return render(request, template_name, {'picture_list': list(pictures)}) def picture_detail(request, slug): -- 2.20.1