If I have: class Task(models.Model): subtasks = models.ManyToManyField('Task', null=True, blank=True, related_name='part_of', symmetrical=False)
how can I check for instances of Task where subtasks or part_of sets are empty? E.g something like (syntactically incorrect): tasks = Task.objects.all() toptasks = tasks.filter(subtasks.count=0) or toptasks = tasks.filter(subtasks__isempty=True) Are there any: subtasks__isempty subtasks__count= subtasks__contains type field lookups? Thanks, Zoltan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---