After Ned's message, I'm -0, because while I'm not fond of multi-line
tags, I cannot offer a good alternative when it comes to multi-line
"with" tags.
On Feb 25, 6:48 pm, Ned Batchelder wrote:
> On 2/24/2012 11:55 PM, Yo-Yo Ma wrote:> I'm -1 on this for s specific reason;
While this would be a valid argument if Django templates only rendered
HTML, that is not the only thing it can be used to render. The original
poster gave a very good example of a text-based email. I could list lots of
other formats in which white space must be followed to even be useful (like
On 2/24/2012 11:55 PM, Yo-Yo Ma wrote:
I'm -1 on this for s specific reason; If you need multiple lines for a
tag, you're doing it wrong.
import this
This would be far more helpful feedback if you would take the examples
of too-long tags presented in this thread, and show the "right" way to
Let me make sure I've got this right --- The situation being discussed is
not where whitespace is insignificant and can be stripped, but where
whitespace is important and you want to control the exact amount of it,
e.g. plain text emails. In this case, just using stripwhitespace is not
enough.
>
> foo bar {#
>> #}baz
>>
>>
>> You just made a strong argument against multiline tags: I wouldn't want
> to see them abused this way!
>
Ah, I fully expected to be shot down on "aesthetic" reasons. I still
think it's better to have some (maybe slightly ugly) way to do things than
no way
I think this discussion is focusing on template tags, not template
variables. Maybe even a subset of template tags (e.g. block level tagsif,
for, block, filter, etc). Template variables and inline tags (e.g. now)
shouldn't have white space stripped.
In 100% of cases I can think of I either
On Feb 25, 12:04 pm, Florian Apolloner wrote:
> Hi,
>
> On Saturday, February 25, 2012 10:04:21 AM UTC+1, Anssi Kääriäinen wrote:
>
> > In most situations white space matters:
> > {{ user.lastname }} {{ user.firstname }}
>
> Right, but
> """
> {{ user.lastname }}
> {{
Hi,
On Saturday, February 25, 2012 10:04:21 AM UTC+1, Anssi Kääriäinen wrote:
>
> In most situations white space matters:
> {{ user.lastname }} {{ user.firstname }}
>
Right, but
"""
{{ user.lastname }}
{{ user.firstname }}
"""
would have produced exactly the same output in HTML, hence my
*Not* +1 on this.
Using extensively Django since the beginning and had never felt the
need to break a tag on several lines. HTML does not meant to be
written like any programming language (80 cols and so on) and the
philosophy of the Django template language has never been to expose a
On Feb 25, 10:52 am, Florian Apolloner wrote:
> Hi,
>
> On Saturday, February 25, 2012 5:27:43 AM UTC+1, Tai Lee wrote:
>
> > Adding more symbols to existing tags (e.g. {^ for x in y ^} or {% for
> > x in y -%}), multi-line comment tags that don't actually include a
> >
On Feb 25, 10:31 am, Jeremy Dunck wrote:
> On Sat, Feb 25, 2012 at 2:13 AM, Anssi Kääriäinen
>
> wrote:
> > I think you really should use a transactional test case. The reason is
> > that before you do a commit, your writes really should not be visible.
Hi,
On Saturday, February 25, 2012 5:27:43 AM UTC+1, Tai Lee wrote:
>
> Adding more symbols to existing tags (e.g. {^ for x in y ^} or {% for
> x in y -%}), multi-line comment tags that don't actually include a
> comment, and half baked comment tags (where the closing tag is
> assumed) are all
On Sat, Feb 25, 2012 at 2:13 AM, Anssi Kääriäinen
wrote:
> On Feb 25, 9:24 am, Jeremy Dunck wrote:
>> I have a master and a replica. In test, the TEST_MIRROR on the
>> replica points to master. I make writes to master, then read from
>> replica, then
On Feb 25, 9:24 am, Jeremy Dunck wrote:
> I have a master and a replica. In test, the TEST_MIRROR on the
> replica points to master. I make writes to master, then read from
> replica, then assert some numbers.
>
> def test_stuff(self):
>
14 matches
Mail list logo