From 547584af4df530421c153aad6ae69683e002f213 Mon Sep 17 00:00:00 2001 From: Brett Parker Date: Sun, 29 Mar 2009 15:06:43 +0100 Subject: [PATCH] Stop albums from displaying None when they don't need to --- sommitrealweird/photo/templates/photo/album_index.html | 2 ++ sommitrealweird/photo/templates/photo/photo_index.html | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/sommitrealweird/photo/templates/photo/album_index.html b/sommitrealweird/photo/templates/photo/album_index.html index 402deed..33cbbc6 100644 --- a/sommitrealweird/photo/templates/photo/album_index.html +++ b/sommitrealweird/photo/templates/photo/album_index.html @@ -10,7 +10,9 @@ {{ album.get_main_image.caption }} {% endif %}

{{ album.name }}

+ {% if album.caption %}

{{ album.caption }} + {% endif %} {% endfor %} {% if is_paginated %} diff --git a/sommitrealweird/photo/templates/photo/photo_index.html b/sommitrealweird/photo/templates/photo/photo_index.html index 573d6fe..1afcccf 100644 --- a/sommitrealweird/photo/templates/photo/photo_index.html +++ b/sommitrealweird/photo/templates/photo/photo_index.html @@ -4,11 +4,15 @@ {% block content %} {% if object_list %}

{{ object_list.0.album.name }}

+ {% if object_list.0.album.caption %}
{{ object_list.0.album.caption }}
+ {% endif %} {% for photo in object_list %}
{{ photo.caption }} -

{{ photo.caption }} + {% if photo.caption %} +

{{ photo.caption }}

+ {% endif %}
{% endfor %}
 
-- 2.30.2