On Dec 3, 8:36 pm, "Silas" <[EMAIL PROTECTED]> wrote: > I have a problem with generic.list_detail.object_list, a limiting > queryset, and pagination variables. > > For some reason when I use the code below, results are restricted to > the sliced 100, but all the pagination variables show results as if the > slice wasn't there. >
I don't have a solution, but I can explain the reason for this behaviour. - The ObjectPaginator uses the QuerySet.count() method in deriving the 'hits' count that is then used in all its paging calculations - The QuerySet.count() method does not take into account the slice offset and limit I suppose you could file this as a bug in ObjectPaginator -- if it were to base its hits on len(QuerySet), that would solve this problem. Not sure if there would be a performance issue from len() evaluating the QuerySet. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---