> So my object ' de la tourelles>' can't appear in both queryset, right?
Not necessarily. For example, if you had a Place ("Paris"), it may be
associated with multiple users because of the ManyToManyField
("M2M"). In this case let's say Bob and Jane both have a M2M entries
to Paris. When you
Hi folks!
Is this possible ?
In [2]: Place.objects.filter(usual_users__id=1)
Out[2]: [, , ]
In [3]: Place.objects.exclude(usual_users__id=1)
Out[3]: [,
]
AFAIU, exclude() generates an SQL clause like '... where
not()' whereas filter() generates '...
where '. So my object '' can't
2 matches
Mail list logo