Use markdown in posts
I want to be able to use markdown in the posts I am writing. I follow this stackoverflow response.
I first install markdown deux and update requirements.txt
pip install django-markdown-deux
pip freeze > requirements.txt
(remember to remove the pkg-resources==0.0.0
)
Add the following in settings.py:
INSTALLED_APPS = [
...
'markdown_deux',
]
And finally, wherever I use the text from my posts, I need to load the markdown_deux_tags
after the 'extends' and add the tag markdown
:
{ % extends 'blog/base.html' % }
{ % load markdown_deux_tags % }
...
<p></p>
The result is visible in the blog posts of chloevincent.pythonanywhere.com.