+ return lazy(get_value, str)()
+
+
+@register.inclusion_tag('social/carousel.html', takes_context=True)
+def carousel(context, placement):
+ banners = Carousel.get(placement).carouselitem_set.all()#first().get_banner()
+ return {
+ 'banners': [b.get_banner() for b in banners],
+ }
+
+
+@register.inclusion_tag('social/embed_video.html')
+def embed_video(url):
+ m = re.match(r'https://www.youtube.com/watch\?v=([^&;]+)', url)
+ return {
+ 'youtube_id': m.group(1) if m else None,
+ }