Browse Source

Troca url de parlamentar list

pull/726/head
Eduardo Edson Batista Cordeiro Alves 8 years ago
parent
commit
77a55a6932
  1. 2
      sapl/parlamentares/views.py
  2. 2
      sapl/templates/parlamentares/parlamentares_list.html

2
sapl/parlamentares/views.py

@ -203,7 +203,7 @@ class ParlamentarCrud(Crud):
def take_legislatura_id(self): def take_legislatura_id(self):
try: try:
return int(self.request.GET['periodo']) return int(self.request.GET['pk'])
except: except:
for l in Legislatura.objects.all(): for l in Legislatura.objects.all():
if l.atual(): if l.atual():

2
sapl/templates/parlamentares/parlamentares_list.html

@ -5,7 +5,7 @@
<fieldset class="form-group"> <fieldset class="form-group">
<legend>Selecione o Período</legend> <legend>Selecione o Período</legend>
<form method="GET"> <form method="GET">
<select name="periodo" class="form-control" onChange="form.submit();"> <select name="pk" class="form-control" onChange="form.submit();">
{% for l in legislaturas %} {% for l in legislaturas %}
<option value="{{l.id}}" {% if l.id == legislatura_id %} selected {% endif %}> <option value="{{l.id}}" {% if l.id == legislatura_id %} selected {% endif %}>
{{l}} {{l}}

Loading…
Cancel
Save