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

2007-02-17 Thread Russell Keith-Magee
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

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

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

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

2007-02-17 Thread Gary Wilson
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

Re: Can a core dev. take a dig through the edit_inline code?

2007-02-17 Thread Malcolm Tredinnick
On Sat, 2007-02-17 at 09:27 -0800, Simon G. wrote: > Hi Djangonauts, > > I've gone on a bit of a triage rampage tonight (..and this morning), > and there are many tickets regarding edit_inline bugs, and there are > *many* more that are marked as dupes. If someone can fix this up a > bit, this wil

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

2007-02-17 Thread Rubic
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. --~--~-~--

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

2007-02-17 Thread oggie rob
> 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

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

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

2007-02-17 Thread Todd O'Bryan
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

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

2007-02-17 Thread Honza Král
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 %

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

2007-02-17 Thread oggie rob
> 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

Delete permission and no change permission in Admin

2007-02-17 Thread Honza Král
Hi, I just ran into a peculiar behavior of Django's admin interface: if a user has a delete permission for some model, but no change permission, how can he delete an object when he is not allowed on the object listing ?? I have a page with a discussion in it and I don't want people to change other

Re: Can a core dev. take a dig through the edit_inline code?

2007-02-17 Thread James Bennett
On 2/17/07, Simon G. <[EMAIL PROTECTED]> wrote: > I've gone on a bit of a triage rampage tonight (..and this morning), > and there are many tickets regarding edit_inline bugs, and there are > *many* more that are marked as dupes. If someone can fix this up a > bit, this will clean out a lot of bug

Re: push to version 0.96

2007-02-17 Thread James Bennett
On 2/17/07, Gary Wilson <[EMAIL PROTECTED]> wrote: > I can't speak for other developers, but I'm just looking for some > direction on where to focus my spare time in the days leading up to > the sprint, as I would like to see 0.96 get out the door. I've got a list of stuff that we're holding on;

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

Can a core dev. take a dig through the edit_inline code?

2007-02-17 Thread Simon G.
Hi Djangonauts, I've gone on a bit of a triage rampage tonight (..and this morning), and there are many tickets regarding edit_inline bugs, and there are *many* more that are marked as dupes. If someone can fix this up a bit, this will clean out a lot of bug (and some are quite serious - leading

push to version 0.96

2007-02-17 Thread Gary Wilson
What's the plan for 0.96? I know of a few patches that are waiting for post-0.96 to break backwards compatibility. Jacob mentioned a release coming in a week or so in his Moving towards Django 1.0 post, but that was now 5 weeks ago. Since PyCon is next week, is the plan to use that sprint time

Re: UserManger Class question

2007-02-17 Thread Joseph Kocherhans
On 2/17/07, voltron <[EMAIL PROTECTED]> wrote: > > class UserManager(models.Manager): > def create_user(self, username, email, password): > "Creates and saves a User with the given username, e-mail and > password." > now = datetime.datetime.now() > user = self.model(Non

Re: UserManger Class question

2007-02-17 Thread Malcolm Tredinnick
On Sat, 2007-02-17 at 00:33 -0800, voltron wrote: > Forgive if its so obvious, I have´nt coded in Python for a while. > While poking around in the Django internals, I saw this: > > # snip > > class UserManager(models.Manager): > def create_user(self, username, email, password): > "Cr

UserManger Class question

2007-02-17 Thread voltron
Forgive if its so obvious, I have´nt coded in Python for a while. While poking around in the Django internals, I saw this: # snip class UserManager(models.Manager): def create_user(self, username, email, password): "Creates and saves a User with the given username, e-mail and passwor

Re: Bug introduced at changeset 4500

2007-02-17 Thread Rudolph
On Feb 15, 10:53 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Thu, 2007-02-15 at 06:02 -0800, Rudolph wrote: > > Hi, > > > I think I found a bug introduced in changeset 4500 (http:// > > code.djangoproject.com/changeset/4500). When a min_num_in_admin is > > specified without a num_in_adm