X-Git-Url: https://git.mdrn.pl/prawokultury.git/blobdiff_plain/a50ddc685551384615e95785eb01d4505412df5e..8e82784fa2fe21d9c3828adbf43178a39c7cdea6:/migdal/templatetags/migdal_tags.py diff --git a/migdal/templatetags/migdal_tags.py b/migdal/templatetags/migdal_tags.py index f56322e..9c7b15b 100644 --- a/migdal/templatetags/migdal_tags.py +++ b/migdal/templatetags/migdal_tags.py @@ -39,6 +39,19 @@ def entry_short(context, entry): return t.render(template.Context(context)) +@register.simple_tag(takes_context=True) +def entry_promobox(context, entry): + t = template.loader.select_template(( + 'migdal/entry/%s/entry_promobox.html' % entry.type, + 'migdal/entry/entry_promobox.html', + )) + context = { + 'request': context['request'], + 'object': entry, + } + return t.render(template.Context(context)) + + @register.inclusion_tag('migdal/categories.html', takes_context=True) def categories(context, taxonomy): context = {