1.

How can you combine multiple QuerySets in a View?

Answer»

Initially, CONCATENATING QuerySets into lists is believed to be the EASIEST APPROACH. Here’s an EXAMPLE of how to do that:
from itertools import chain
result_list = LIST(chain(model1_list, model2_list, model3_list))



Discussion

No Comment Found