开发者

how to use markdown with django? by only in 2 tags

开发者 https://www.devze.com 2023-03-07 00:44 出处:网络
I want to use markdown with django. I开发者_如何学Go want to allow use bold and strike tags. Others don\'t convert.

I want to use markdown with django.

I开发者_如何学Go want to allow use bold and strike tags. Others don't convert.

Please teach me.


Django supports Markdown, but you'll need to install the Python package: http://docs.djangoproject.com/en/1.3/ref/contrib/markup/


You can take a look at markdown2 for converting text to html. But if you just want to use bold and strike, maybe you should look for using directly regex/parser.

A "secure" mode is also possible in markdown2, forcing the user to use only the official markdown syntax, with ignoring the html. (making it more secure)

0

精彩评论

暂无评论...
验证码 换一张
取 消