Skip to content

Commit 10fc639

Browse files
adiciona templatefilter para renderizar markdown no template
1 parent d1fabb2 commit 10fc639

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

core/templatetags/__init__.py

Whitespace-only changes.

core/templatetags/markdown.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from markdownx.utils import markdownify
2+
from django import template
3+
4+
5+
register = template.Library()
6+
7+
8+
@register.filter
9+
def render_markdown(value):
10+
return markdownify(value)

0 commit comments

Comments
 (0)