Django Markup Template Tags

Changeset 467 contains template tags for renderingTextile (using PyTextile), Markdown (using python-markdown), and ReStructured Text (using docutils). You can find usage examples and some basic tests in markup.py.

You need to make sure that you have the correct modules installed to do the heavy lifting, but the tags are extremely easy to use:

  • {{ textile_content|textile }}
  • {{ markdown_content|markdown }}
  • {{ rest_content|restructuredtext }}

4 Responses to “Django Markup Template Tags”


  1. 1 Simon Willison Aug 12th, 2005 at 12:18 pm

    Note that all the actual work is done by this one file:

    http://code.djangoproject.com/file/django/trunk/django/contrib/markup/templatetags/markup.py

    I think it’s a very neat example of how easy it is to write custom filters for the template language.

  2. 2 max Aug 10th, 2006 at 12:43 pm

    ajkhkadkjas Google

  1. 1 Jakki Degg Trackback on Jun 20th, 2007 at 6:00 am
  2. 2 Jaki Degg Trackback on Jun 20th, 2007 at 6:01 am

Leave a Reply