Browse Source

Fix nome de field na ord de List ColigacaoCrud

pull/626/head
LeandroRoberto 8 years ago
parent
commit
70a92514aa
  1. 13
      sapl/parlamentares/views.py

13
sapl/parlamentares/views.py

@ -149,6 +149,7 @@ class CargoMesaCrud(Crud):
help_path = 'cargo_mesa' help_path = 'cargo_mesa'
class BaseMixin(PermissionRequiredMixin, CrudBaseMixin): class BaseMixin(PermissionRequiredMixin, CrudBaseMixin):
def has_permission(self): def has_permission(self):
return permissao_tb_aux(self) return permissao_tb_aux(self)
@ -158,6 +159,7 @@ class PartidoCrud(Crud):
help_path = 'partidos' help_path = 'partidos'
class BaseMixin(PermissionRequiredMixin, CrudBaseMixin): class BaseMixin(PermissionRequiredMixin, CrudBaseMixin):
def has_permission(self): def has_permission(self):
return permissao_tb_aux(self) return permissao_tb_aux(self)
@ -167,6 +169,7 @@ class SessaoLegislativaCrud(Crud):
help_path = 'sessao_legislativa' help_path = 'sessao_legislativa'
class BaseMixin(PermissionRequiredMixin, CrudBaseMixin): class BaseMixin(PermissionRequiredMixin, CrudBaseMixin):
def has_permission(self): def has_permission(self):
return permissao_tb_aux(self) return permissao_tb_aux(self)
@ -176,6 +179,7 @@ class TipoDependenteCrud(Crud):
help_path = 'nivel_instrucao' help_path = 'nivel_instrucao'
class BaseMixin(PermissionRequiredMixin, CrudBaseMixin): class BaseMixin(PermissionRequiredMixin, CrudBaseMixin):
def has_permission(self): def has_permission(self):
return permissao_tb_aux(self) return permissao_tb_aux(self)
@ -185,6 +189,7 @@ class NivelInstrucaoCrud(Crud):
help_path = 'tipo_dependente' help_path = 'tipo_dependente'
class BaseMixin(PermissionRequiredMixin, CrudBaseMixin): class BaseMixin(PermissionRequiredMixin, CrudBaseMixin):
def has_permission(self): def has_permission(self):
return permissao_tb_aux(self) return permissao_tb_aux(self)
@ -194,6 +199,7 @@ class TipoAfastamentoCrud(Crud):
help_path = 'tipo_afastamento' help_path = 'tipo_afastamento'
class BaseMixin(PermissionRequiredMixin, CrudBaseMixin): class BaseMixin(PermissionRequiredMixin, CrudBaseMixin):
def has_permission(self): def has_permission(self):
return permissao_tb_aux(self) return permissao_tb_aux(self)
@ -203,6 +209,7 @@ class TipoMilitarCrud(Crud):
help_path = 'tipo_situa_militar' help_path = 'tipo_situa_militar'
class BaseMixin(PermissionRequiredMixin, CrudBaseMixin): class BaseMixin(PermissionRequiredMixin, CrudBaseMixin):
def has_permission(self): def has_permission(self):
return permissao_tb_aux(self) return permissao_tb_aux(self)
@ -251,9 +258,10 @@ class ColigacaoCrud(Crud):
help_path = 'tabelas_auxiliares#coligacao' help_path = 'tabelas_auxiliares#coligacao'
class ListView(CrudListView): class ListView(CrudListView):
ordering = ('-numero', 'nome') ordering = ('-numero_votos', 'nome')
class BaseMixin(PermissionRequiredMixin, CrudBaseMixin): class BaseMixin(PermissionRequiredMixin, CrudBaseMixin):
def has_permission(self): def has_permission(self):
return permissao_tb_aux(self) return permissao_tb_aux(self)
@ -281,6 +289,7 @@ class ComposicaoColigacaoCrud(MasterDetailCrud):
ordering = '-partido__sigla' ordering = '-partido__sigla'
class BaseMixin(PermissionRequiredMixin, MasterDetailCrud.BaseMixin): class BaseMixin(PermissionRequiredMixin, MasterDetailCrud.BaseMixin):
def has_permission(self): def has_permission(self):
return permissao_tb_aux(self) return permissao_tb_aux(self)
@ -296,6 +305,7 @@ class LegislaturaCrud(Crud):
form_class = LegislaturaForm form_class = LegislaturaForm
class BaseMixin(PermissionRequiredMixin, CrudBaseMixin): class BaseMixin(PermissionRequiredMixin, CrudBaseMixin):
def has_permission(self): def has_permission(self):
return permissao_tb_aux(self) return permissao_tb_aux(self)
@ -335,6 +345,7 @@ class ParlamentarCrud(Crud):
help_path = '' help_path = ''
class DetailView(CrudDetailView): class DetailView(CrudDetailView):
def get_template_names(self): def get_template_names(self):
usuario = self.request.user usuario = self.request.user
lista_permissoes = get_parlamentar_permissions() lista_permissoes = get_parlamentar_permissions()

Loading…
Cancel
Save