I would like to add or link several Querysets in Django, preserving the order of each of them (and not the result). I use a third-party library to break down the result, and it only accepts lists or queries. I tried these options:
Queryset join : does not preserve order in separate queries, so I cannot use this.
result = queryset_1 | queryset_2
Using itertools . Calling list() on a chained object actually evaluates the requests, and this can cause a lot of overhead. Is not it?
result = list(itertools.chain(queryset_1, queryset_2))
Do you think I should go?
python django django-queryset
Caumons
source share