Re: #7666: Default managers should not restrict access to single related objects

2008-07-24 Thread Justin Bronn
> I forgot to note before, I've added a patch to #7666 which uses James' > suggestion of a pristine QuerySet. Using a "pristine" QuerySet is a bad assumption to make, especially for those who are using custom managers to properly generate SQL for non-standard columns, e.g., geometries. The patch

Re: #7666: Default managers should not restrict access to single related objects

2008-07-22 Thread magneto
Sorry if a made a mistake, but i reopened #7666 for a reason mentioned in the ticket (i hope i stepped on no ones toes by doing that) the comment reads as follows """ this change, effectively kills "get" overloading in Managers i can think of a million reasons way this is necessary, caching th

Re: #7666: Default managers should not restrict access to single related objects

2008-07-20 Thread Nick Lane
On Jul 8, 3:34 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Mon, Jul 7, 2008 at 8:29 PM, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > Currently, ReverseSingleRelatedObjectDescriptor uses _default_manager, > > which is the problem (line 239 in django/db/models/related/fields.py). > > One c

Re: #7666: Default managers should not restrict access to single related objects

2008-07-07 Thread James Bennett
On Mon, Jul 7, 2008 at 8:29 PM, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > Currently, ReverseSingleRelatedObjectDescriptor uses _default_manager, > which is the problem (line 239 in django/db/models/related/fields.py). > One clean solution would be to give each model a _pristine_manager > attrib

Re: #7666: Default managers should not restrict access to single related objects

2008-07-07 Thread Ivan Sagalaev
Adrian Holovaty wrote: > This is certainly a bug. The main question is how to fix it. Oh, it's a big can of worms, actually. I was once pondering on this and found some tricky cases. 1) Managers are not just restrict querysets by filtering. They can be used for example to produce custom querys

Re: #7666: Default managers should not restrict access to single related objects

2008-07-07 Thread Adrian Holovaty
On Mon, Jul 7, 2008 at 7:08 PM, Joseph Kocherhans <[EMAIL PROTECTED]> wrote: > I've filed #7666 [1] which has a test I wrote that fails to illustrate > what I believe is a bug. The code is a lot easier to understand than > my english, so I'll let it speak for itself. This is certainly a bug. The

#7666: Default managers should not restrict access to single related objects

2008-07-07 Thread Joseph Kocherhans
I've filed #7666 [1] which has a test I wrote that fails to illustrate what I believe is a bug. The code is a lot easier to understand than my english, so I'll let it speak for itself. To be clear, I'm just talking about changing the behavior of ReverseSingleRelatedObjectDescriptor, not SingleRela