From: Radek Czajka Date: Thu, 16 Oct 2014 12:06:19 +0000 (+0200) Subject: Fixes #3506: active picture links. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/6dd3e47a80aeb8d0208bcbfdaaa6275d0cceae3d Fixes #3506: active picture links. --- 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), })