On Sep 26, 7:33 pm, Simon Willison <si...@simonwillison.net> wrote: > 1. a {% selfclose %} template tag: > > <br{% selfclose %}> > > {% selfclose %} outputs either blank or " /" depending on the doctype.
I've added an experimental {% slash %} tag to django-html to address the reusable XHTML/HTML templates problem. It's actually not as horrible as I first thought - you end up writing template code like this: <br{% slash %}> <img src="/site/logo.png" alt="My site"{% slash %}> It's not exactly beautiful, but it's the simplest thing that could possibly work. Most Django developers who aren't writing code designed to be used with differing doctypes won't ever have to use it. In the absence of a better idea I'm pretty happy with it. http://github.com/simonw/django-html Cheers, Simon --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---