many to many - django manytomany filter question -
grass,
I have a model that looks like this
class person (models.Model): name = models.CharField (empty = wrong, max_length = 100) friend = model. ManyToManyField ('self', empty = true, zero = true)
<I tried
people_with_friends = person.objects.filter (friends = true)
>thanks
What about it?
people_in different friends = person.objects.exclude (friend = none)
Comments
Post a Comment