Re: Re: Select all instances of a model that have a null ForeignKey value

2006-09-09 Thread James Bennett
On 9/9/06, cyberco <[EMAIL PROTECTED]> wrote: > Thank you! That is a pretty obscure method. It's obscure but it's necessary; the way Django parses the lookup parameters will drop any parameter of the form 'somefield=None', so that the parameter never makes it into the eventual database query (hav

Re: Select all instances of a model that have a null ForeignKey value

2006-09-09 Thread cyberco
Thank you! That is a pretty obscure method. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, se

Re: Select all instances of a model that have a null ForeignKey value

2006-09-09 Thread John DeRosa
cyberco wrote: > Given: > > =Models== > class T(models.Model): > pass > > class Y(models.Model): > t = models.ForeignKey(T, blank=True, null=True) > > > I want to select all instances of a Y that have a null value for t. I > would say that it sho

Select all instances of a model that have a null ForeignKey value

2006-09-09 Thread cyberco
Given: =Models== class T(models.Model): pass class Y(models.Model): t = models.ForeignKey(T, blank=True, null=True) I want to select all instances of a Y that have a null value for t. I would say that it should be... Y.o