I'm building an app that requires pagination. I looked at the
official
pagination documentation I found at:
http://www.djangoproject.com/documentation/models/pagination/
I followed the tutorial and basically: paginator =
ObjectPaginator(Article.objects.all(), 5) is where all the "magic"
happens.
On Aug 31, 9:11 pm, Sebastian Macias <[EMAIL PROTECTED]>
wrote:
> What I'm concerned about is that Article.objects.all() will return a
> query_set with all of the records. If I have millions of records it
> means the returned query_set will be huge and I'm affraid performance
> will be poor in and
There should be no problem at all (taken from the paginator source
http://code.djangoproject.com/browser/django/trunk/django/core/paginator.py#L39):
An queryset like Category.objects.all() would result in (see above
link):
>>> from django.db import connection
>>> Category.objects.all()[5:10]
[, ,
3 matches
Mail list logo