Something like this might be able to help you? http://www.davidcramer.net/code/369/spaceless-html-in-django.html Dougal
--- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/3/15 Benjamin Buch <benni.b...@gmx.de> > > Hi, > > is there a way to tighten up the output that Django renders? > Especially, remove the empty lines? > > This template code: > > <div> > {% for entry in entries %} > <p>{{ entry.title }}</p> > {% endfor %} > </div> > > looks like this when rendered: > > <div> > > <p>Title 1</p> > > <p>Title 1</p> > > <p>Title 1</p> > > </div> > > I stumbled upon this middleware, > http://code.djangoproject.com/wiki/StripWhitespaceMiddleware, > but the discussion around it is somewhat dated, > and even the author states that there are some problems with it. > http://code.djangoproject.com/wiki/ContributedMiddleware > > Is there any other way to handle it? > > benjamin > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---