Re: Filtering with respect to a related objects field

2009-02-05 Thread Alex Gaynor
On Thu, Feb 5, 2009 at 6:38 PM, Justin Bronn wrote: > > > Is there a way that default managers can be taken into > > consideration when filtering through related fields? I don't know > > exactly how this is supposed to work, is this the desired behavior? > > > > It's not a

Re: Filtering with respect to a related objects field

2009-02-05 Thread Justin Bronn
> Is there a way that default managers can be taken into > consideration when filtering through related fields?  I don't know > exactly how this is supposed to work, is this the desired behavior? > It's not a bug, it's a feature :) Specifically, it's an artifact from the 'fix' in #7666 --

Re: Filtering with respect to a related objects field

2009-02-05 Thread Will Matos
velopers <django-developers@googlegroups.com> Cc: evan.rei...@gmail.com <evan.rei...@gmail.com> Sent: Thu Feb 05 17:21:11 2009 Subject: Filtering with respect to a related objects field Say I have a model like this: class Photo(models.Model): name = models.CharField(max_length=25) u

Re: Filtering with respect to a related objects field

2009-02-05 Thread Alex Gaynor
On Thu, Feb 5, 2009 at 5:21 PM, Stephen Sundell wrote: > > Say I have a model like this: > > class Photo(models.Model): >name = models.CharField(max_length=25) >user = models.ForeignKey(User,related_name='photos') >image = models.ImageField() >site =

Filtering with respect to a related objects field

2009-02-05 Thread Stephen Sundell
Say I have a model like this: class Photo(models.Model): name = models.CharField(max_length=25) user = models.ForeignKey(User,related_name='photos') image = models.ImageField() site = models.ForeignKey(Site,related_name='site_photos') objects = CurrentSiteManager() I've