I have models something like this:

class Attribute (Model):
        name = CharField(maxlength=32)
        private = BooleanField(default=False)

class Object (Model):
        ...
        attr = ForeignKey(Attribute, null=True, blank=True)

now I want to exclude Objects containing a private Attribute from a
queryset:

qs.exclude(attr_private=True)

Unfortunately this also excludes all Objects that have no Attribute.

Is there a way to filter a queryset that will pass Objects with no
Attribute and those whose Attribute is not private?

        Andrew

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to