Busy making things: tinycast, github, links, photos, @mc.

Django Markup Template Tags

Posted: August 10th, 2005 | Author: | Filed under: Django, Python | 13 Comments »

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 }}

13 Comments on “Django Markup Template Tags”

  1. 1 Simon Willison said at 12:18 pm on August 12th, 2005:

    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 said at 12:43 pm on August 10th, 2006:

    ajkhkadkjas Google

  3. 3 Jakki Degg said at 6:00 am on June 20th, 2007:

    Jakki Degg…

    I Googled for something completely different, but found your page…and have to say thanks. nice read….

  4. 4 Jaki Degg said at 6:01 am on June 20th, 2007:

    Jaki Degg…

    I Googled for something completely different, but found your page…and have to say thanks. nice read….

  5. 5 online propecia said at 1:27 am on January 24th, 2011:

    I think, that you commit an error. I can prove it. Write to me in PM, we will discuss.

  6. 6 vyvoz stroitelnogo musora said at 3:50 pm on February 7th, 2011:

    vyvoz stroitelnogo musora spb…

    vyvoz musora…

  7. 7 fheiffh said at 4:14 pm on February 10th, 2011:

    Can you write another article about this subject simply because this post was a bit tricky to comprehend? I just couldnt leave your website before suggesting that we really enjoyed the quality information you offer for your visitors Will be back often to check on up on new posts

  8. 8 Tyson F. Gautreaux said at 11:43 am on February 13th, 2011:

    Where did you got this much info on your blog from?? Also can i take the initiave to take the feeds from your blog for my yoga website?? But cant find the RSS feeds link here!!

  9. 9 tory-burch-reva-flats said at 4:26 am on February 14th, 2011:

    cheap tory burch shoes …

    Tory Burch Handbags is a trendy yet durable.Tory Burch is an American fashion designer who got her start on the upper-east side of Manhattan. Tory Burch Designer Handbags are a great collection of high quality fun handbags available in a wide variety o…

  10. 10 tory-burch-flip-flops said at 10:28 pm on February 14th, 2011:

    discount tory burch shoes…

    We specialize in selling trendy shoes online. A huge selection of women’s shoes for a very cheap price, the top name brand of discount tory burch casual shoes, tory burch boots, women’s sandals, fashion shoes.And here has cheap 2011 tory burch new a…

  11. 11 tory-burch-new-arrival said at 10:34 pm on February 14th, 2011:

    cheap tory burch shoes …

    Saletoryubrchon.com provide good quality and best price for cheap tory burch shoes products, there offer tory burch boots,tory burch sandals,tory burch flats,tory burch handbangs sale, tory burch wallets for free shipping. …

  12. 12 Emma Mae said at 3:52 am on February 20th, 2011:

    Ive been meaning to read this and just never acquired a chance. Its an issue that Im pretty interested in, I just started reading and Im glad I did. Youre a wonderful blogger, one of the best that Ive seen. This weblog unquestionably has some information on subject that I just wasnt aware of. Thanks for bringing this things to light.

  13. 13 vets in phoenix az said at 4:01 am on February 20th, 2011:

    Ive been meaning to read this and just never received a chance. Its an issue that Im very interested in, I just started reading and Im glad I did. Youre a fantastic blogger, one of the most effective that Ive seen. This blog absolutely has some data on subject that I just wasnt aware of. Thanks for bringing this things to light.