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

Reply via email to