Duplicate django query set?
- by Piotr Czapla
I have a simple django's query set like:
qs = AModel.objects.exclude(state="F").order_by("order")
I'd like to use it as follows:
qs[0:3].update(state='F')
expected = qs[3] # throws error here
But last statement throws:
"Cannot update a query once a slice has been taken."
How can I duplicate the query set?