'Accepts a partial ``object_list``, for the purpose of offset and count calculation.
The ``object_list`` is partial if and only if ``total`` is given. In that case,
the list is the data for the *next* call to ``page()``.
If the ``object_list`` is the full list, ``total`` must be None.'

def __init__(self, object_list, per_page, total=None, allow_empty_first_page=True):

    super(Paginator, self).__init__(object_list, per_page, 0, allow_empty_first_page)
    if (total is None):
        self.object_list = object_list
    else:
        self.object_list = None
        self._partial_list = object_list
        if isinstance(object_list, query.QuerySet):
            total = max(total, len(object_list))
        self._count = total
