From 3123270a35221f196a21630501790f6b61d6eb57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Zapke-Gru=CC=88ndemann?= Date: Wed, 8 Feb 2012 20:11:47 +0100 Subject: prevent errors if thumbnail does not exist --- sublab_project/news/templates/news/news_detail.html | 2 +- sublab_project/news/templates/news/news_list.html | 2 +- sublab_project/projects/templates/projects/project_detail.html | 2 +- 3 files changed, 3 insertions(+), 3 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 %}

{{ object.date_updated|date:"DATETIME_FORMAT" }}

{{ object.title }}

- {% if object.image %} + {% if object.image.exists %}
{% 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 @@

{{ post.date_updated|date }} - {{ post.title }}

- {% if post.image %} + {% if post.image.exists %}