Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

How to combine two or more querysets in a Django view?

## GITHUB URL: https://stackoverflow.com/questions/431628/how-can-i-combine-two-or-more-querysets-in-a-django-view

from itertools import chain
result_list = list(chain(page_list, article_list, post_list))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #How #combine #querysets #Django
ADD COMMENT
Topic
Name
2+7 =