fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Main page.
[wolnelektury.git]
/
src
/
social
/
templatetags
/
social_tags.py
diff --git
a/src/social/templatetags/social_tags.py
b/src/social/templatetags/social_tags.py
index
88d6771
..
193a1ce
100644
(file)
--- 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)
@register.inclusion_tag('social/embed_video.html')
def embed_video(url):
m = re.match(r'https://www.youtube.com/watch\?v=([^&;]+)', url)