From: Brett Parker Date: Sun, 29 Mar 2009 14:06:43 +0000 (+0100) Subject: Stop albums from displaying None when they don't need to X-Git-Url: https://git.sommitrealweird.co.uk/sommitrealweird.git/commitdiff_plain/547584af4df530421c153aad6ae69683e002f213?ds=sidebyside Stop albums from displaying None when they don't need to --- 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 %}