Browse Source

Fix case insensitive search by Assunto in Protocolo

pull/11/merge
Edward Ribeiro 9 years ago
parent
commit
be96c73dc5
  1. 2
      protocoloadm/views.py
  2. 2
      templates/protocoloadm/protocolo_list.html

2
protocoloadm/views.py

@ -262,7 +262,7 @@ class ProtocoloPesquisaView(FormMixin, GenericView):
kwargs['autor'] = request.POST['autor'] kwargs['autor'] = request.POST['autor']
if request.POST['assunto']: if request.POST['assunto']:
kwargs['assunto'] = request.POST['assunto'] kwargs['assunto_ementa__icontains'] = request.POST['assunto']
request.session['kwargs'] = kwargs request.session['kwargs'] = kwargs
return redirect('protocolo_list') return redirect('protocolo_list')

2
templates/protocoloadm/protocolo_list.html

@ -7,9 +7,9 @@
<!-- Total: {{ protocolos|length }} --> <!-- Total: {{ protocolos|length }} -->
<table> <table>
<tr><td>Número de Protocolo</td> <tr><td>Número de Protocolo</td>
<td>Ano</td>
<td>Assunto</td> <td>Assunto</td>
<td>Tipo de Documento</td> <td>Tipo de Documento</td>
<td>Ano</td>
<td>Data</td> <td>Data</td>
</tr> </tr>
{% for p in protocolos %} {% for p in protocolos %}

Loading…
Cancel
Save