X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/50aec69a46276ec94d7d4d2ab3c59bc383d07a2c..48a6d2ddc3e5ce215beddd6369f01598651ad216:/src/annoy/templatetags/annoy.py diff --git a/src/annoy/templatetags/annoy.py b/src/annoy/templatetags/annoy.py index 21f1bb85e..2bc93143c 100644 --- a/src/annoy/templatetags/annoy.py +++ b/src/annoy/templatetags/annoy.py @@ -14,6 +14,14 @@ def annoy_banner(context, place): 'closable': PLACES.get(place, False), } +@register.inclusion_tag('annoy/banner_blackout.html', takes_context=True) +def annoy_banner_blackout(context): + banners = Banner.choice('blackout', request=context['request']) + return { + 'banner': banners.first(), + 'closable': True, + } + @register.inclusion_tag('annoy/banners.html', takes_context=True) def annoy_banners(context, place):