How to build a django Q object

I wonder what the correct way to build an object Q(...)that does not match the object in the query set. It seems that both of Q()and ~Q()comply with all the objects!

+4
source share
1 answer

Q (pk__in = []) should do the trick.

+4
source

Source: https://habr.com/ru/post/1584943/


All Articles