Re: Null Query Set

2006-11-04 Thread Steve Wedig
When I say id=None, it returns all of the items. My guess is that if a field is set to none, it just ignores that argument. However filter( id=-1) does the trick. Thanks for the tip. However django should probably have a way to do this without pinging the db (i think :) - Steve On 10/27/06, Mal

Re: Null Query Set

2006-10-27 Thread Malcolm Tredinnick
On Fri, 2006-10-27 at 00:06 -0700, Steve Wedig wrote: > I'm interested in returning a Null (empty) query set. I guess this is > like the Null Object pattern. So it has to be a QuerySet implements > the interface (.count, .all, etc) that always returns nothing. > > Does anyone know how to do this?