Re: class based views: object instead of dictionary as context?

2011-09-02 Thread Jacob Kaplan-Moss
On Fri, Sep 2, 2011 at 4:15 PM, Greg Donald wrote: > Clearly you've been working with some hybrid wanna-be designers who > probably don't do any heavy lifting in either realm. Greg, I hope and am going to assume you're joking. If not -- and remember with email it can hard to

Re: class based views: object instead of dictionary as context?

2011-09-02 Thread Greg Donald
On Fri, Sep 2, 2011 at 11:35 AM, Carl Meyer wrote: > But please lay off the overblown rhetoric. I can name fifteen designers > who code off the top of my head (more than I could name who don't). Clearly you've been working with some hybrid wanna-be designers who probably don't

Re: Race condition in get_or_create

2011-09-02 Thread Jeremy Dunck
We've been running in prod without trouble under 'read committed' for about a week, though not under heavy load -- it's a fairly new site. I'm not sure how much assurance I can offer at higher load, sorry. On Fri, Sep 2, 2011 at 11:42 AM, Ian Clelland wrote: > > > On Fri,

Re: Race condition in get_or_create

2011-09-02 Thread Ian Clelland
On Fri, Sep 2, 2011 at 11:22 AM, Jeremy Dunck wrote: > On Fri, Sep 2, 2011 at 11:04 AM, Ian Clelland wrote: > > I'm seeing errors which I believe are due to a race condition in > > django.db.models.query.get_or_create, on a fairly high traffic site. Our > >

Re: Race condition in get_or_create

2011-09-02 Thread Jeremy Dunck
On Fri, Sep 2, 2011 at 11:04 AM, Ian Clelland wrote: > I'm seeing errors which I believe are due to a race condition in > django.db.models.query.get_or_create, on a fairly high traffic site. Our > production servers are running Django 1.2.5, but I don't see any changes in >

Re: Race condition in get_or_create

2011-09-02 Thread Ian Clelland
And, of course, immediately after posting this, I find http://code.djangoproject.com/ticket/13906, which seems to cover much of the same area. Ian On Fri, Sep 2, 2011 at 11:04 AM, Ian Clelland wrote: > I'm seeing errors which I believe are due to a race condition in >

Race condition in get_or_create

2011-09-02 Thread Ian Clelland
I'm seeing errors which I believe are due to a race condition in django.db.models.query.get_or_create, on a fairly high traffic site. Our production servers are running Django 1.2.5, but I don't see any changes in the code in trunk that would affect this. (I'm totally willing to construct a test

Re: ticket 13125 is waiting for a design decision for 18 months

2011-09-02 Thread David Danier
> Description: > "The login_required decorator is not checking User.is_active, as > staff_member_required does. If an authenticated user is deactivated > (via setting is_active to False), the user is still able to browse > login_required-protected views." > For probably most people, the expected

Re: class based views: object instead of dictionary as context?

2011-09-02 Thread Carl Meyer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/02/2011 01:01 AM, Greg Donald wrote: > Planning for designers to work in code is an extreme edge case. In 15 > years of web development I've never once worked with a single designer > who was interested in touching any code. As far as my own

Re: Exceptions thrown from middleware

2011-09-02 Thread Michael Manfre
I opened ticket #12250 for this exact reason a while ago. It's currently design decision needed. I'm still in favor of giving middleware a chance to handle errors raised by middleware. https://code.djangoproject.com/ticket/12250 Regards, Michael On Sep 1, 11:48 am, Tom Evans

Re: class based views: object instead of dictionary as context?

2011-09-02 Thread Reinout van Rees
On 02-09-11 10:04, Russell Keith-Magee wrote: To the best of my knowledge, the only reason the view isn't included in the template context is because over more than two years of design discussion, I don't think the idea of including the view in the context was ever proposed. [...] Patches

Re: class based views: object instead of dictionary as context?

2011-09-02 Thread Russell Keith-Magee
On Fri, Sep 2, 2011 at 3:00 PM, Greg Donald wrote: > On Thu, Sep 1, 2011 at 3:46 PM, Reinout van Rees wrote: >> why does django encourage a hand-crafted >> context dictionary instead of "just" passing the view object along? > > I think it's the worst part

Re: class based views: object instead of dictionary as context?

2011-09-02 Thread Russell Keith-Magee
On Fri, Sep 2, 2011 at 1:25 PM, daonb wrote: > Hi Reinout, > > IMHO, Django's philosophy is that template designers are highly > skilled designers and not coders.  To make it possible for designers > to edit the templates themselves, Django requires the developer to > create

Re: class based views: object instead of dictionary as context?

2011-09-02 Thread Greg Donald
On Fri, Sep 2, 2011 at 12:25 AM, daonb wrote: > IMHO, Django's philosophy is that template designers are highly > skilled designers and not coders.  To make it possible for designers > to edit the templates themselves, Planning for designers to work in code is an extreme

Re: class based views: object instead of dictionary as context?

2011-09-02 Thread Greg Donald
On Thu, Sep 1, 2011 at 3:46 PM, Reinout van Rees wrote: > why does django encourage a hand-crafted > context dictionary instead of "just" passing the view object along? I think it's the worst part of using Django. Having to manage a context dictionary in every view is weak.