Interaction between [Multiple]ModelChoiceField and its widget

2008-05-29 Thread Arnaud Delobelle
Hi, I would like to suggest a modest change in some newforms objects, namely ModelChoiceField and MultipleModelChoiceField, and how they interact with their widgets. Before I describe the change, let me explain an example in which I think this is desirable. There is also the possibility that I

Re: suggestion for a slightly extended {% for ... in ... %} tag

2007-02-18 Thread Arnaud Delobelle
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

Re: suggestion for a slightly extended {% for ... in ... %} tag

2007-02-17 Thread Arnaud Delobelle
[...] > 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

Re: suggestion for a slightly extended {% for ... in ... %} tag

2007-02-17 Thread Arnaud Delobelle
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

suggestion for a slightly extended {% for ... in ... %} tag

2007-02-17 Thread Arnaud Delobelle
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