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