Django lazy QuerySet and pagination

前端 未结 2 1357
后悔当初
后悔当初 2020-12-02 15:05

I read here that Django querysets are lazy, it won\'t be evaluated until it is actually printed. I have made a simple pagination using the django\'s built-in pagination. I d

2条回答
  •  旧巷少年郎
    2020-12-02 15:17

    It is. Django's pagination uses the same rules/optimizations that apply to querysets.

    This means it will start evaluating on return HttpResponse(output)

提交回复
热议问题