Re: More efficient negative lookups

2010-10-29 Thread andybak
One small related point. The admin could benefit from a way of doing negative lookups within the lookup syntax itself. Currently there is no way to construct an exclude filter change list views in the URL. i.e. If I am writing a custom filterspec or anything else that results in a URL for a chan

Re: More efficient negative lookups

2010-10-28 Thread Russell Keith-Magee
On Thu, Oct 28, 2010 at 6:59 AM, George Vilches wrote: > > > On Oct 27, 5:55 pm, Jacob Kaplan-Moss wrote: >> On Wed, Oct 27, 2010 at 4:32 PM, Adrian Holovaty wrote: >> > I'm inclined to say we do the former -- restore the "ne" lookup type >> > -- because it's a quick fix, and ask somebody to wri

Re: More efficient negative lookups

2010-10-28 Thread George Vilches
On Oct 27, 2010, at 5:55 PM, Jacob Kaplan-Moss wrote: > On Wed, Oct 27, 2010 at 4:32 PM, Adrian Holovaty wrote: >> I'm inclined to say we do the former -- restore the "ne" lookup type >> -- because it's a quick fix, and ask somebody to write up a patch for >> the latter. Does anybody have strong

Re: More efficient negative lookups

2010-10-27 Thread George Vilches
On Oct 27, 5:55 pm, Jacob Kaplan-Moss wrote: > On Wed, Oct 27, 2010 at 4:32 PM, Adrian Holovaty wrote: > > I'm inclined to say we do the former -- restore the "ne" lookup type > > -- because it's a quick fix, and ask somebody to write up a patch for > > the latter. Does anybody have strong opin

Re: More efficient negative lookups

2010-10-27 Thread Adrian Holovaty
On Wed, Oct 27, 2010 at 4:55 PM, Jacob Kaplan-Moss wrote: > However, just for the record I think the reason we decided to remove > __ne is the first place was that its existence introduces a weird > inconsistency with regard to other lookup types. That is, if there's a > "ne" why isn't there a "ns

Re: More efficient negative lookups

2010-10-27 Thread Alex Gaynor
On Wed, Oct 27, 2010 at 5:55 PM, Jacob Kaplan-Moss wrote: > On Wed, Oct 27, 2010 at 4:32 PM, Adrian Holovaty wrote: >> I'm inclined to say we do the former -- restore the "ne" lookup type >> -- because it's a quick fix, and ask somebody to write up a patch for >> the latter. Does anybody have str

Re: More efficient negative lookups

2010-10-27 Thread Jacob Kaplan-Moss
On Wed, Oct 27, 2010 at 4:32 PM, Adrian Holovaty wrote: > I'm inclined to say we do the former -- restore the "ne" lookup type > -- because it's a quick fix, and ask somebody to write up a patch for > the latter. Does anybody have strong opinions against this? If not, I > can restore the "ne" look

More efficient negative lookups

2010-10-27 Thread Adrian Holovaty
Hi all, I'd like to fix an inefficiency in our ORM's negative lookups. A long, long time ago, we had an "ne" lookup for QuerySet.filter(), which would let us do "not equals" lookups, like this: MyModel.objects.filter(slug__ne='ignoreme') Unfortunately, we removed this lookup type in http://code