diff --git a/parlamentares/views.py b/parlamentares/views.py index 2900bde3c..468c10bf5 100644 --- a/parlamentares/views.py +++ b/parlamentares/views.py @@ -148,7 +148,7 @@ class ParlamentaresView(GenericView): def get(self, request, *args, **kwargs): form = ParlamentaresForm() return self.render_to_response( - {'legislaturas': Legislatura.objects.all(), + {'legislaturas': Legislatura.objects.all().order_by('-data_inicio'), 'legislatura_id': Legislatura.objects.first().id, 'mandatos': Mandato.objects.all(), 'form': form, @@ -157,7 +157,7 @@ class ParlamentaresView(GenericView): def post(self, request, *args, **kwargs): form = ParlamentaresForm(request.POST) return self.render_to_response( - {'legislaturas': Legislatura.objects.all(), + {'legislaturas': Legislatura.objects.all().order_by('-data_inicio'), 'legislatura_id': int(form.data['periodo']), 'mandatos': Mandato.objects.all(), 'form': form, diff --git a/templates/base.html b/templates/base.html index b851e69ab..4e96fe0c8 100644 --- a/templates/base.html +++ b/templates/base.html @@ -62,54 +62,49 @@ -