How to convert WMD markdown syntax to HTML on my site?

I use django and implement WMD on my website, just wondering how do I convert markdown syntax to HTML for display purposes, is there any function that I have to call for this conversion?

What is the best way to handle markdowns, i.e. Do I save markdown as it is in the database, then analyze it when it is displayed, or should I save the converted HTML and then convert it to markup during editing?

+3
source share
1 answer

Check out the markup add-in that comes with Django. This is what you are looking for.

, 'django.contrib.markup' INSTALLED_APPS. , {% load markup%} , . django/contrib/markup/templatetags/markup.py.

, .

+7

Source: https://habr.com/ru/post/1706631/


All Articles