Django Markup Template Tags


Posted

in

,

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

Comments

13 responses to “Django Markup Template Tags”

  1. Simon Willison Avatar

    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. max Avatar

    ajkhkadkjas Google

  3. Jakki Degg…

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

  4. Jaki Degg…

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

  5. online propecia Avatar

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

  6. vyvoz stroitelnogo musora spb…

    vyvoz musora…

  7. fheiffh Avatar

    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. Tyson F. Gautreaux Avatar

    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. 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. 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. 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. Emma Mae Avatar

    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. vets in phoenix az Avatar

    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.