I write this because I think that this behaibour should bi fixed, am I right?
Anyway I have putted the load tag in the second line of my tempalte :)
Juanjo
--
Juanjo Conti
I'm not familiar with the RTF format, but to eliminate the blank line at
the top of an html file, you would do this:
{% load ... %}<html>
instead of
{% load ... %}
<html>
Hopefully this helps!
Jeff Anderson
Template's white space handling is one of the few things that irks me
about Django. I hate having to make confusing formating, jamming stuff
all on the same line just to get white space correct.
I really wish it had some whitespace handling tools like Cheetah
http://www.cheetahtemplate.org/docs/users_guide_html/users_guide.html#SECTION000680000000000000000
The spaceless tag helps sometimes, but not for your situation.
--
Norman J. Harman Jr.
Senior Web Specialist, Austin American-Statesman
___________________________________________________________________________
You've got fun! Check out Austin360.com for all the entertainment
info you need to live it up in the big city!
Or Template Toolkit's:
http://template-toolkit.org/docs/manual/Syntax.html#section_Chomping_Whitespace
Arien
If there is a particular whitespace-eating behaviour that you would
like, you could always implement it yourself in a template tag. If you
think the template tag could be useful for others, you can share it on
djangosnippets.org, or open a ticket to have the tag considered for
inclusion in Django itself.
If what you're proposing can't be done in a template tag, we're always
open to suggestions on how to make Django better. Put down your ideas
in a ticket, and we'll consider it.
Yours,
Russ Magee %-)
What I'm use to is less of particular tag and more of a change to how
all tags/templates work. In short, lines in templates that have only
tags should be "invisible" i.e. they should not be in the output of that
template.
If after doing tag processing a line(that had 1+ tags to begin with)
consists of nothing but whitespace then eliminate that line, including
it's new line.
line numbers for ref:
1: <foo>{% if bar %}bar{% endif %}
2: {% for i in list %}
3: i
4: {% if False %}</foo><foo>{% endif %}
5: {% endfor %}
6: </foo>
which now creates something like this when bar=False, list=[1,2]
1:<foo>
2:
3: 1
4:
3: 2
4:
5:
6:</foo>
instead outputs this
1:<foo>
3: 1
3: 2
6:</foo>
But this is a backwards incompatible change, a minor issue, and with
effort it's possible to work around this issue just not beautifully
(which contrasts with the rest of Django).
Other stuff is higher priority and the real problem with Django is
http://superjared.com/entry/real-problem-django/. I didn't mean to
sound complainy in previous post, if anyone took it that way.