is there any way to concatenate sliced querysets?
its simplified example (i realize this particular example can be written in one query):
>>> ...
>>> query_set_1 = Model.objects.filter(...)[:3]
>>> query_set_2 = Model.objects.filter(...)[5:]
>>> query_set_1 | query_set_2
not going to work,
>>> AssertionError: Cannot combine queries once a slice has been taken.
any suggestions?
thanks!
No. But
itertools.chain()will allow you to iterate through both querysets in order.