@register.inclusion_tag('catalogue/plain_list.html', takes_context=True)
def plain_list(context, object_list, with_initials=True, by_author=False, choice=None, book=None, gallery=False,
- paged=True):
+ paged=True, initial_blocks=False):
names = [('', [])]
last_initial = None
for obj in object_list:
fragment_count = fragments.count()
fragment = fragments[randint(0, fragment_count - 1)] if fragment_count else None
return fragment.pk if fragment is not None else None
+
+
+@register.filter
+def strip_tag(html, tag_name):
+ # docelowo może być warto zainstalować BeautifulSoup do takich rzeczy
+ import re
+ return re.sub(r"<.?%s\b[^>]*>" % tag_name, "", html)