感谢您的回答和建议,但我决定使用markdown-deux。
这是我的做法:
pip install django-markdown-deux
然后,我做
pip freeze > requirements.txt了确保我的需求文件已更新。
然后,我在INSTALLED_APPS列表中添加了’markdown_deux’:
INSTALLED_APPS = ( ... 'markdown_deux', ...)
然后我将模板更改
index.html为:
{% load markdown_deux_tags %}<html> <head> <title>My Django Blog</title> </head> <body> {% for post in post %} <h1>{{ post.title }}</h1> <h3>{{ post.pub_date }}</h3> {{ post.text|markdown }} {{ post.tags }} {% endfor %} </body></html>


