|
|
|
@ -902,9 +902,9 @@ class PesquisarDocumentoAdministrativoView(DocumentoAdministrativoMixin, |
|
|
|
context = super(PesquisarDocumentoAdministrativoView, |
|
|
|
self).get_context_data(**kwargs) |
|
|
|
|
|
|
|
if self.paginate_by: |
|
|
|
paginator = context['paginator'] |
|
|
|
page_obj = context['page_obj'] |
|
|
|
|
|
|
|
context['page_range'] = make_pagination( |
|
|
|
page_obj.number, paginator.num_pages) |
|
|
|
|
|
|
|
@ -934,8 +934,7 @@ class PesquisarDocumentoAdministrativoView(DocumentoAdministrativoMixin, |
|
|
|
length = self.object_list.count() |
|
|
|
|
|
|
|
is_relatorio = url!='' and request.GET.get('relatorio',None) |
|
|
|
max_elementos_pdf = 10000 |
|
|
|
self.paginate_by = max_elementos_pdf if is_relatorio else 10 |
|
|
|
self.paginate_by = None if is_relatorio else self.paginate_by |
|
|
|
context = self.get_context_data(filter=self.filterset, |
|
|
|
filter_url=url, |
|
|
|
numero_res=length |
|
|
|
|