Lots of changes to fix lots of bugs and add comments to blog
[sommitrealweird.git] / sommitrealweird / photo / templates / photo / photo_index.html
index 573d6fe98e5e34e10f0cf7d159a2abd7aea53f03..27e441793c72123650a0718ef04893480dcebd97 100644 (file)
@@ -1,14 +1,20 @@
 {% extends "base.html" %}
 {% load thumbnail %}
 
+{% block title %}Photos - {{ object_list.0.album.caption }}{% endblock %}
+
 {% block content %}
     {% if object_list %}
         <h1>{{ object_list.0.album.name }}</h1>
+        {% if object_list.0.album.caption %}
         <div class="album_caption">{{ object_list.0.album.caption }}</div>
+        {% endif %}
         {% for photo in object_list %}
             <div class="photo">
                 <a href="{{ photo.id }}/"><img src='{{ photo.image.url|thumbnail:"width=250" }}' alt="{{ photo.caption }}" /></a>
-                <p>{{ photo.caption }}</h2>
+                {% if photo.caption %}
+                <p>{{ photo.caption }}</p>
+                {% endif %}
             </div>
         {% endfor %}
         <div style="clear: both;">&nbsp;</div>