Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Newline stripping in templates: the dnl way

Received: by 10.52.72.230 with SMTP id g6mr5483172vdv.5.1330164871797;
        Sat, 25 Feb 2012 02:14:31 -0800 (PST)
X-BeenThere: django-developers@googlegroups.com
Received: by 10.220.4.24 with SMTP id 24ls3450253vcp.9.gmail; Sat, 25 Feb 2012
 02:14:22 -0800 (PST)
MIME-Version: 1.0
Received: by 10.52.93.116 with SMTP id ct20mr611991vdb.20.1330164862411; Sat,
 25 Feb 2012 02:14:22 -0800 (PST)
Authentication-Results: ls.google.com; spf=pass (google.com: domain of
 anssi.kaariai...@thl.fi designates internal as permitted sender)
 smtp.mail=anssi.kaariai...@thl.fi; dkim=pass
 header...@thl.fi
Received: by cj6g2000vbb.googlegroups.com with HTTP; Sat, 25 Feb 2012 02:14:22
 -0800 (PST)
Date: Sat, 25 Feb 2012 02:14:22 -0800 (PST)
In-Reply-To: <32051836.648.1330164266174.JavaMail.geo-discussion-forums@vbbfy7>
References: <5911fbb4-1b19-4ca3-9a56-fa33b756c8be@f5g2000yqm.googlegroups.com>
 <CAFHbX1LAHEdcsVao7QzuRgx+Qzii7mXHtgBaQRw1eBEWo+okEA@mail.gmail.com>
 <CADu1=23A9AHWHR94=Xvxo2KiSbjAbDoU5fJ1tnxk7Q69gVbGqg@mail.gmail.com>
 <3528350.311.1330102178664.JavaMail.geo-discussion-forums@vbcu2>
 <CANE-7mX3Y7wyT3R=WrGfa9CAEWJ6_oXdbgVWm8JArQ0sGcqeSg@mail.gmail.com>
 <8afa57f3-8232-4f66-b505-87174973d485@cj6g2000vbb.googlegroups.com>
 <9a46f674-6bfe-4bb0-ba79-e2981779a59e@w4g2000vbc.googlegroups.com>
 <23599892.571.1330159944285.JavaMail.geo-discussion-forums@vbai14>
 <bd0a18ee-6d07-4707-a791-77238abc4c78@gw9g2000vbb.googlegroups.com> <32051836.648.1330164266174.JavaMail.geo-discussion-forums@vbbfy7>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101 Firefox/11.0,gzip(gfe)
Message-ID: <22f9e035-74b3-41d3-b7d3-db61a435dc62@cj6g2000vbb.googlegroups.com>
Subject: Re: Newline stripping in templates: the dnl way
From: =?ISO-8859-1?Q?Anssi_K=E4=E4ri=E4inen?= <anssi.kaariai...@thl.fi>
To: Django developers <django-developers@googlegroups.com>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

On Feb 25, 12:04=A0pm, Florian Apolloner <f.apollo...@gmail.com> wrote:
> Hi,
>
> On Saturday, February 25, 2012 10:04:21 AM UTC+1, Anssi K=E4=E4ri=E4inen =
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 statement
> that you usually don't have to care about it that much. Eg, you need to
> make sure that there is whitespace but it doesn't matter how much since
> it's collapsed anyways (and outside of tags it doesn't matter at all=85)

I was just illuminating why putting {% stripwhitespace on %} in the
beginning of the template might not be that great an idea. Even with
the line change between the first and lastname they would be
concatenated if all whitespace is stripped.

I think we agree on this issue. Maybe I should have quoted the
original poster of the idea instead...