You can limit the results to a QuerySet by doing something like this:
qs = MyModel.objects.all()[:3]
Since QuerySet is usually evaluated lazily, is it possible to remove this limit from qs before repeating it?
I was hoping for something direct, like qs = qs[:] or qs = qs[0:] , but it doesn't work. So far I can only work qs.query.clear_limits() , but I'm not sure if this is part of the public API (I had to wade through the Django source code to find it).
source share