> would I still be able to paginate over the entire list of 10000 objects? Or my list would be shortened to 5 objects?
Its the latter. Your query set will loop only for the size of it's length. On Sat, Dec 19, 2009 at 12:03 PM, Continuation <selforgani...@gmail.com>wrote: > In the django-pagination, it uses the example: > {% autopaginate object_list %} > > My question is does object_list have to be the **entire** list over > which I want to paginate, or can I limit the length of object_list? If > I limit the length of object_list, will autopaginate still go through > the entire list? > > As an example, say I want to paginate over the list a.field_set.all(). > Let's say that list has 10000 objects. I might not want my database to > return such a large result set. So I might want to do something like: > > object_list = a.field_set()[:5] > > Now if I use {% autopaginate object_list %} in my template, would I > still be able to paginate over the entire list of 10000 objects? Or my > list would be shortened to 5 objects? > > -- > > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > > -- Regards, Lakshman becomingguru.com lakshmanprasad.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.