OR and AND without django.db.models.Q

, , django, querysets

I just found out that or and and are defined for QuerySet. This means that to do queries union or intersection, you can do:

    User.objects.filter(...) | User.objects.filter(...)
    User.objects.filter(...) & User.objects.filter(...)
contact us right now