X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/528a34731579d8b81df43879f2b63c2754005a86..d8a368e376f9f50ff0e3714ef716df548e86bd7f:/src/social/templatetags/social_tags.py diff --git a/src/social/templatetags/social_tags.py b/src/social/templatetags/social_tags.py index 88d6771db..193a1ce3a 100644 --- a/src/social/templatetags/social_tags.py +++ b/src/social/templatetags/social_tags.py @@ -85,6 +85,14 @@ def carousel(context, placement): } +@register.inclusion_tag('social/carousel_2022.html', takes_context=True) +def carousel_2022(context, placement): + banner = Carousel.get(placement).carouselitem_set.first().get_banner() + return { + 'banner': banner, + } + + @register.inclusion_tag('social/embed_video.html') def embed_video(url): m = re.match(r'https://www.youtube.com/watch\?v=([^&;]+)', url)