From 6dd3e47a80aeb8d0208bcbfdaaa6275d0cceae3d Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Thu, 16 Oct 2014 14:06:19 +0200 Subject: [PATCH 1/1] Fixes #3506: active picture links. --- apps/picture/templates/picture/picture_wide.html | 3 ++- apps/picture/templatetags/picture_tags.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/picture/templates/picture/picture_wide.html b/apps/picture/templates/picture/picture_wide.html index cb05889d0..920a9c060 100644 --- a/apps/picture/templates/picture/picture_wide.html +++ b/apps/picture/templates/picture/picture_wide.html @@ -6,8 +6,9 @@ {% block box-class %}book-wide-box{% endblock %} {% block picture-view %} + {% thumbnail picture.image_file "535" upscale="false" as thumb %} - + {% endthumbnail %} {% endblock %} diff --git a/apps/picture/templatetags/picture_tags.py b/apps/picture/templatetags/picture_tags.py index 7e464fa02..76ae1dece 100644 --- a/apps/picture/templatetags/picture_tags.py +++ b/apps/picture/templatetags/picture_tags.py @@ -3,6 +3,7 @@ # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from django import template +from django.core.urlresolvers import reverse from catalogue.utils import split_tags from ..engine import CustomCroppingEngine import sorl.thumbnail.default @@ -16,7 +17,7 @@ cropper = CustomCroppingEngine() def picture_wide(context, picture): context.update({ 'picture': picture, - 'main_link': picture.get_absolute_url(), + 'main_link': reverse('picture_viewer', args=[picture.slug]), 'request': context.get('request'), 'tags': split_tags(picture.tags), }) -- 2.20.1