Using django.contrib.markup

Having your users input data and outputting it in ways other than straight plain text can be complicated. However, using different markup languages like markdown can make things easier for you the developer and your users. This video goes over how to use markdown, textile and restructured text built right into Django.
commands
pip install docutils markdown textile
settings.py
INSTALLED_APPS(
     'django.contrib.markup',
)
templates/home/index.html
{% load markup %}

{% for data in object_list %}
     {{ data.markdown }}
     {{ data.markdown|markdown }}

     {{ data.textile }}
     {{ data.textile|textile }}

     {{ data.restructuredtext }}
     {{ data.restructuredtext|restructuredtext }}
{% endfor %}
comments powered by Disqus