1👍
✅
You can work with:
[q['number'] for qs in qs_list for q in qs]
where qs_list
is the list of QuerySet
s.
That being said, often a list of QuerySet
s means you are doing something inefficient, since you will here make a query per QuerySet
in the list. Often you can derive the values all in the same query.
Source:stackexchange.com