1 from django import template
2 from django.template import Node, Variable, Template, Context
3 from catalogue.utils import split_tags
5 register = template.Library()
7 @register.inclusion_tag('picture/picture_short.html', takes_context=True)
8 def picture_short(context, picture):
11 'main_link': picture.get_absolute_url(),
12 # 'related': picture.related_info(),
13 'request': context.get('request'),
14 'tags': split_tags(picture.tags),
17 @register.inclusion_tag('picture/picture_wide.html', takes_context=True)
18 def picture_wide(context, picture):
21 'main_link': picture.get_absolute_url(),
22 # 'related': picture.related_info(),
23 'request': context.get('request'),
24 'tags': split_tags(picture.tags),