Last active
August 3, 2017 12:37
-
-
Save LucasMagnum/860f3a234c1a805f8b2df8e64b825ef0 to your computer and use it in GitHub Desktop.
Intersection and Bitwise operation AND
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Intersection queryset method | |
active_adult_products = active_products.intersection(adult_products) | |
# Bitwise operation using & to get the AND behavior | |
active_adult_products = active_products & adult_products |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment