From ab56da9604daf8debed9dea27bcadf7aa48f891c Mon Sep 17 00:00:00 2001 From: Eduardo Calil Date: Mon, 12 Sep 2016 10:16:06 -0300 Subject: [PATCH] Fix #567 --- sapl/comissoes/views.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sapl/comissoes/views.py b/sapl/comissoes/views.py index d4333f63d..81c978081 100644 --- a/sapl/comissoes/views.py +++ b/sapl/comissoes/views.py @@ -3,7 +3,7 @@ from django.core.urlresolvers import reverse from django.views.generic import ListView from sapl.crud.base import (Crud, CrudBaseMixin, CrudCreateView, - CrudDeleteView, CrudUpdateView) + CrudDeleteView, CrudListView, CrudUpdateView) from sapl.crud.masterdetail import MasterDetailCrud from sapl.materia.models import Tramitacao from sapl.utils import permissao_tb_aux, permissoes_comissoes @@ -137,6 +137,10 @@ class ComissaoCrud(Crud): class DeleteView(PermissionRequiredMixin, CrudDeleteView): permission_required = permissoes_comissoes() + class ListView(PermissionRequiredMixin, CrudListView): + permission_required = permissoes_comissoes() + ordering = ['-ativa', 'sigla'] + class BaseMixin(CrudBaseMixin): list_field_names = ['nome', 'sigla', 'tipo', 'data_criacao', 'ativa']