Browse Source
Update views.py
Adiciona o object_list para ordenação
pull/2181/head
Talitha Pumar
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
1 deletions
-
sapl/norma/views.py
|
|
|
@ -87,7 +87,8 @@ class NormaPesquisaView(FilterView): |
|
|
|
context['title'] = _('Pesquisar Norma Jurídica') |
|
|
|
|
|
|
|
self.filterset.form.fields['o'].label = _('Ordenação') |
|
|
|
|
|
|
|
|
|
|
|
qs = self.object_list |
|
|
|
if 'o' in self.request.GET and not self.request.GET['o']: |
|
|
|
qs = qs.order_by('-ano', 'tipo', '-numero') |
|
|
|
|
|
|
|
|