Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

add or combine two querysets django

matches = pages | articles | posts

#It retains all the functions of the querysets which is nice if you want to order_by or similar.
#Please note: this doesn't work on querysets from two different models.
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #combine #querysets #django
ADD COMMENT
Topic
Name
7+6 =