def paginate_queryset(self, queryset, page_size):
        paginator = self.get_paginator(queryset, page_size, allow_empty_first_page=self.get_allow_empty())
        page_kwarg = self.page_kwarg
        page = self.kwargs.get(page_kwarg) or self.request.GET.get(page_kwarg) or 1
        try:
            page_number = int(page)
        except ValueError:
            if page == 'last':
                page_number = paginator.num_pages
            else:
                raise Http404(_("Page is not 'last', nor can it be converted to an int."))
        try:
            page = paginator.page(page_number)
            return (paginator, page, page.object_list, page.has_other_pages())
        except InvalidPage as e:
            raise Http404(_('Invalid page (%(page_number)s): %(message)s') % {
                                'page_number': page_number,
                                'message': str(e)
            })
Compute the outdir for the zipalign task.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/views/generic/list.py/MultipleObjectMixin.paginate_queryset--crossover with--dataset/ETHPy150Open pantsbuild/pants/contrib/android/src/python/pants/contrib/android/tasks/zipalign.py/Zipalign.zipalign_out