1๐
โ
You do something like:
from itertools import chain
result_list = list(chain(firstq, secondq))
๐คAnup
4๐
I think this can help you
from itertools import chain
def get_all_data():
first = FirstModel.objects.filter()
second = SecondModel.objects.filter()
result_list = sorted(
chain(first, second),
key=lambda data: data.addedtime, reverse=True)
return result_list
๐คMr Singh
- [Django]-Is it possible to show progress bar of django celery task?
- [Django]-Django PDF FileResponse "Failed to load PDF document."
Source:stackexchange.com