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 | |
parent | 7d96ecbe3054c3a913cc401fa13fe54aa376598c (diff) |
prevent errors if thumbnail does not exist
-rw-r--r-- | sublab_project/news/templates/news/news_detail.html | 2 | ||||
-rw-r--r-- | sublab_project/news/templates/news/news_list.html | 2 | ||||
-rw-r--r-- | 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 %} <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 %} diff --git a/sublab_project/projects/templates/projects/project_detail.html b/sublab_project/projects/templates/projects/project_detail.html index 5c0a6dd..126e601 100644 --- a/sublab_project/projects/templates/projects/project_detail.html +++ b/sublab_project/projects/templates/projects/project_detail.html @@ -5,7 +5,7 @@ {% block content %} <h2 id="{{ object.slug }}">Projekt: {{ object.name }}</h2> - {% if object.image %} + {% if object.image.exists %} <div class="imagecontent"> <a href="{% url project_image object.slug %}"> {% thumbnail object.image "200" upscale=False as image %} |