Commits

Anonymous committed 188be52

Added bbcode template tag

  • Participants
  • Parent commits 675fae7

Comments (0)

Files changed (2)

File gnocchi_forum/templatetags/__init__.py

Empty file added.

File gnocchi_forum/templatetags/forum.py

+from django import template
+from django.utils.safestring import mark_safe
+
+register = template.Library()
+
+@register.filter
+def bbcode(value):
+    from postmarkup import render_bbcode
+    return mark_safe(render_bbcode(value))