From b36b07a0031bd4135c516bb52fe70eb1a2351d99 Mon Sep 17 00:00:00 2001 From: Eduardo Calil Date: Fri, 1 Apr 2016 14:54:44 -0300 Subject: [PATCH] =?UTF-8?q?Finaliza=20a=20correcao=20da=20pagina=C3=A7ao?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- materia/views.py | 7 +++-- templates/paginacao_pesquisa_materia.html | 34 ++--------------------- 2 files changed, 7 insertions(+), 34 deletions(-) diff --git a/materia/views.py b/materia/views.py index 9f0e991aa..30f7fbeb9 100644 --- a/materia/views.py +++ b/materia/views.py @@ -1248,9 +1248,12 @@ class MateriaLegislativaPesquisaView(FilterView): self.object_list = self.filterset.qs if (data and data.get('numero') is not None): - url = str(self.request.environ['QUERY_STRING']) + url = "&"+str(self.request.environ['QUERY_STRING']) + if url[:5] == "&page": + ponto_comeco = url.find('numero=') - 1 + url = url[ponto_comeco:] else: - url = None + url = '' context = self.get_context_data(filter=self.filterset, object_list=self.object_list, diff --git a/templates/paginacao_pesquisa_materia.html b/templates/paginacao_pesquisa_materia.html index 0395ab951..5fb4b1b9f 100644 --- a/templates/paginacao_pesquisa_materia.html +++ b/templates/paginacao_pesquisa_materia.html @@ -3,23 +3,11 @@