﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
7478	Paginator could detect if the object_list is a QuerySet or a list	batiste@…	nobody	"If the Paginator is accidentally used to count a large QuerySet (instead of a QuerySetPaginator), the generated SQL request could be inefficient (all content will be retrieved just to make len on it).  Why don't we automatically detect if object_list has a count attribute? The paginator API will be simpler and it will be more difficult to introduce performance issues.

{{{
    def _get_count(self):
        if self._count is None:
            if hasattr(self.object_list, 'count'):
                self._count = self.object_list.count()
            else:
                self._count = len(self.object_list)
        return self._count
    count = property(_get_count)
}}}

And by the way the Paginator is far way to simple for my needs so I have sub class it. But I can't derivate from both QuerySetPaginator and Paginator. It's antoher reason why I think it's not a good idea to have 2 classes.
"		closed	Core (Other)	dev		fixed	paginator		Unreviewed	0	0	0	0	0	0
