Basic picture lists.
authorRadek Czajka <rczajka@rczajka.pl>
Thu, 1 Dec 2022 14:44:35 +0000 (15:44 +0100)
committerRadek Czajka <rczajka@rczajka.pl>
Thu, 1 Dec 2022 14:44:35 +0000 (15:44 +0100)
src/catalogue/templates/catalogue/2022/author_detail.html
src/picture/views.py

index c063d9e..54486fb 100644 (file)
@@ -71,6 +71,7 @@
       </div>
     </div>
 
       </div>
     </div>
 
+    {% if tags %}
     <section class="l-section">
       <div class="l-author">
         {% with author=tags.0 %}
     <section class="l-section">
       <div class="l-author">
         {% with author=tags.0 %}
@@ -94,4 +95,5 @@
         {% endif %}
       </div>
     </section>
         {% endif %}
       </div>
     </section>
+    {% endif %}
 {% endblock %}
 {% endblock %}
index e742c15..194bb98 100644 (file)
@@ -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())
         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):
 
 
 def picture_detail(request, slug):