Try parent__isnull=True.
http://www.djangoproject.com/documentation/db_api/
--~--~-~--~~~---~--~~
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
Hello,
I need all records of _Category_ that doesn't have _parent_:
In my model:
#
class Category(models.Model):
#... code here
parent = models.ForeignKey('self', blank=True, null=True,
related_name='child_set')
##
all_categorys =
2 matches
Mail list logo