Ejemplo n.º 1
0
    def get_context_data(self, **kwargs):
        context = super(ProtocoloListView, self).get_context_data(**kwargs)

        paginator = context['paginator']
        page_obj = context['page_obj']

        context['page_range'] = make_pagination(page_obj.number,
                                                paginator.num_pages)
        return context
Ejemplo n.º 2
0
    def get_context_data(self, **kwargs):
        context = super(ProtocoloListView, self).get_context_data(
            **kwargs)

        paginator = context['paginator']
        page_obj = context['page_obj']

        context['page_range'] = make_pagination(
            page_obj.number, paginator.num_pages)
        return context
Ejemplo n.º 3
0
    def get_context_data(self, **kwargs):
        context = super(PesquisarDocumentoAdministrativoView,
                        self).get_context_data(**kwargs)

        paginator = context['paginator']
        page_obj = context['page_obj']

        context['page_range'] = make_pagination(page_obj.number,
                                                paginator.num_pages)

        return context
Ejemplo n.º 4
0
    def get_context_data(self, **kwargs):
        context = super(PesquisarDocumentoAdministrativoView,
                        self).get_context_data(**kwargs)

        paginator = context['paginator']
        page_obj = context['page_obj']

        context['page_range'] = make_pagination(
            page_obj.number, paginator.num_pages)

        return context
Ejemplo n.º 5
0
def test_make_pagination(index, num_pages, result):
    assert num_pages < 10 or len(result) == 10
    assert make_pagination(index, num_pages) == result
Ejemplo n.º 6
0
def test_make_pagination(index, num_pages, result):
    assert num_pages < 10 or len(result) == 10
    assert make_pagination(index, num_pages) == result