Hello, First of all, my model:
class Application(models.Model): name = models.CharField(_('name'),maxlength=200,unique=True) class Screenshot(models.Model): application = models.ForeignKey(Application,edit_inline=True,num_in_admin=5) image = models.ImageField(_('image'),upload_to="screenshots/",height_field="height",width_field="width") caption = models.CharField(_('caption'),maxlength=200,core=True) height = models.IntegerField(_('height'),blank=True,null=True,editable=False) width = models.IntegerField(_('width'),blank=True,null=True,editable=False) This works in my view: context["app"] = Application.objects.filter(screenshot__id__isnull=False).distinct() These does not work (returns an empty list where it should not): context["app"] = Application.objects.filter(screenshot__id__isnull=True) or context["app"] = Application.objects.exclude(screenshot__id__isnull=False) Why ? Olive. --~--~---------~--~----~------------~-------~--~----~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---