On 2/18/07, SmileyChris <[EMAIL PROTECTED]> wrote:
>
>
>
> On Feb 18, 10:10 pm, "Arnaud Delobelle" <[EMAIL PROTECTED]>
> wrote:
> > > However - I acknowledge the use case: Two lists, n items long, that
> > > are from independent sources. I think a separate template tag in the
> > > same vein as {%
On Feb 18, 10:10 pm, "Arnaud Delobelle" <[EMAIL PROTECTED]>
wrote:
> > However - I acknowledge the use case: Two lists, n items long, that
> > are from independent sources. I think a separate template tag in the
> > same vein as {% regroup %} would be a better approach.
>
> > {% zip lista list
On Feb 18, 6:54 am, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
[...]
> > > Also (maybe more contentious):
> > > {% for i in L1,L2 %} meaning what one would write in python as:
> > > for i in zip(L1,L2)
>
> Most people seem to be +0 on this, but I'm very much -1.
>
> Firstly, the proposed
On 2/18/07, oggie rob <[EMAIL PROTECTED]> wrote:
>
> > I find it useful to have the {% for %} tag syntax extended so that one can
> > write:
> > {% for a,b in L %} meaning the obvious thing
+1.
> > Also (maybe more contentious):
> > {% for i in L1,L2 %} meaning what one would write in python
> I find it useful to have the {% for %} tag syntax extended so that one can
> write:
> {% for a,b in L %} meaning the obvious thing
+1
> Also (maybe more contentious):
> {% for i in L1,L2 %} meaning what one would write in python as:
> for i in zip(L1,L2)
+0
On 2/18/07, Gary Wilson <[EMAIL P
On Feb 17, 3:58 pm, "Honza Král" <[EMAIL PROTECTED]> wrote:
> On 2/17/07, oggie rob <[EMAIL PROTECTED]> wrote:
> > > I find it useful to have the {% for %} tag syntax extended so that one
> > > can write:
> > > {% for a,b in L %} meaning the obvious thing
>
> +1
+1
The {{ x.0 }} syntax is simply
On Feb 17, 11:29 am, "Arnaud Delobelle" <[EMAIL PROTECTED]>
wrote:
> I find it useful to have the {% for %} tag syntax extended so that one
> can write:
> {% for a,b in L %} meaning the obvious thing
+1 from me, too. Nicer than the current idiom.
--
Jeff Bauer
Rubicon, Inc.
--~--~-~--
> You can do this of course but it does not help to make sense of the
> template. E.g.
>
> {% for key,value in L %}
> {{ key }}->{{ value }}
> {% endfor %}
Yes, however you're looking at the case of only two variables. Think
of how unmanageable it will start to look like this:
{% for name,descr
[...]
> If you change the tuples into dictionaries in the view, you can get
> the same kind of clarity (and that's what I find myself doing quite a
> bit, actually):
>
> {% for x in L %}
> {{ x.name }}
> {{ x.description }}
> {% endfor %}
>
Yes I found myself doing that a lot too until I
On Feb 17, 9:48 pm, "oggie rob" <[EMAIL PROTECTED]> wrote:
> > I find it useful to have the {% for %} tag syntax extended so that one can
> > write:
> > {% for a,b in L %} meaning the obvious thing
>
> You can do this. a,b return type is implicitly (a,b) in Python. In
> other words:
> {% for x
On Feb 17, 2007, at 4:58 PM, Honza Král wrote:
> On 2/17/07, oggie rob <[EMAIL PROTECTED]> wrote:
>>
>>> I find it useful to have the {% for %} tag syntax extended so
>>> that one can write:
>>> {% for a,b in L %} meaning the obvious thing
>
> +1
>
>>
>> You can do this. a,b return type is imp
On 2/17/07, oggie rob <[EMAIL PROTECTED]> wrote:
>
> > I find it useful to have the {% for %} tag syntax extended so that one can
> > write:
> > {% for a,b in L %} meaning the obvious thing
+1
>
> You can do this. a,b return type is implicitly (a,b) in Python. In
> other words:
> {% for x in L %
> I find it useful to have the {% for %} tag syntax extended so that one can
> write:
> {% for a,b in L %} meaning the obvious thing
You can do this. a,b return type is implicitly (a,b) in Python. In
other words:
{% for x in L %}
{{ x.0 }}
{{ x.1 }}
{% endfor %}
> Also (maybe more contentiou
Hi everyone,
I have been using django with great pleasure and there is a slight
extension to the {% for ... in ... %} default tag I would like to
propose.
I find it useful to have the {% for %} tag syntax extended so that one
can write:
{% for a,b in L %} meaning the obvious thing
Also (maybe m
14 matches
Mail list logo