diff options
author | Markus Zapke-Grùˆndemann <markus@keimlink.de> | 2012-02-08 20:11:47 +0100 |
---|---|---|
committer | Markus Zapke-Grùˆndemann <markus@keimlink.de> | 2012-02-08 20:11:47 +0100 |
commit | 3123270a35221f196a21630501790f6b61d6eb57 (patch) | |
tree | a95bb7206dbafabcdf09d56150d7ba76458189cd /sublab_project/news/templates | |
parent | 7d96ecbe3054c3a913cc401fa13fe54aa376598c (diff) |
prevent errors if thumbnail does not exist
Diffstat (limited to 'sublab_project/news/templates')
-rw-r--r-- | sublab_project/news/templates/news/news_detail.html | 2 | ||||
-rw-r--r-- | sublab_project/news/templates/news/news_list.html | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sublab_project/news/templates/news/news_detail.html b/sublab_project/news/templates/news/news_detail.html index a91517e..c5153da 100644 --- a/sublab_project/news/templates/news/news_detail.html +++ b/sublab_project/news/templates/news/news_detail.html @@ -6,7 +6,7 @@ {% block content %} <p class="news_date">{{ object.date_updated|date:"DATETIME_FORMAT" }}</p> <h2 id="{{ object.slug }}">{{ object.title }}</h2> - {% if object.image %} + {% if object.image.exists %} <div class="imagecontent"> <a href="{% url news_image object.slug %}"> {% thumbnail object.image "200" upscale=False as image %} diff --git a/sublab_project/news/templates/news/news_list.html b/sublab_project/news/templates/news/news_list.html index fa11311..116de0a 100644 --- a/sublab_project/news/templates/news/news_list.html +++ b/sublab_project/news/templates/news/news_list.html @@ -9,7 +9,7 @@ <h3 id="{{ post.slug }}"> <a href="{{ post.get_absolute_url }}">{{ post.date_updated|date }} - {{ post.title }}</a> </h3> - {% if post.image %} + {% if post.image.exists %} <div class="imagecontent"> <a href="{{ post.get_absolute_url }}"> {% thumbnail post.image "200" upscale=False as image %} |