예제 #1
0
파일: views.py 프로젝트: wesleylima247/sapl
    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
예제 #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
예제 #3
0
파일: views.py 프로젝트: wesleylima247/sapl
    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
예제 #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
예제 #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
예제 #6
0
파일: test_base.py 프로젝트: Danpeli/sapl
def test_make_pagination(index, num_pages, result):
    assert num_pages < 10 or len(result) == 10
    assert make_pagination(index, num_pages) == result