From b61e65f8121b1fe8110136b72a4c557ac4c638be Mon Sep 17 00:00:00 2001 From: LeandroRoberto Date: Thu, 8 Mar 2018 15:08:46 -0300 Subject: [PATCH] =?UTF-8?q?corrige=20importa=C3=A7=C3=A3o=20de=20vari?= =?UTF-8?q?=C3=A1vel=20de=20settings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/materia/admin.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sapl/materia/admin.py b/sapl/materia/admin.py index 65b754817..6ffebda25 100644 --- a/sapl/materia/admin.py +++ b/sapl/materia/admin.py @@ -1,17 +1,19 @@ +from django.conf import settings from django.contrib import admin -from sapl.materia.models import Proposicao, TipoMateriaLegislativa + from sapl.base.models import TipoAutor from sapl.comissoes.models import TipoComissao -from sapl.parlamentares.models import TipoAfastamento, SituacaoMilitar, TipoDependente +from sapl.materia.models import Proposicao, TipoMateriaLegislativa from sapl.norma.models import TipoNormaJuridica, TipoVinculoNormaJuridica -from sapl.sessao.models import TipoSessaoPlenaria, TipoExpediente, TipoResultadoVotacao +from sapl.parlamentares.models import TipoAfastamento, SituacaoMilitar, TipoDependente from sapl.protocoloadm.models import TipoDocumentoAdministrativo -from sapl.settings import DEBUG +from sapl.sessao.models import TipoSessaoPlenaria, TipoExpediente, TipoResultadoVotacao from sapl.utils import register_all_models_in_admin + register_all_models_in_admin(__name__) -if not DEBUG: +if not settings.DEBUG: admin.site.unregister(Proposicao) admin.site.unregister(TipoAutor) @@ -20,7 +22,6 @@ if not DEBUG: admin.site.unregister(SituacaoMilitar) admin.site.unregister(TipoDependente) - class RestricaoAdmin(admin.ModelAdmin): def has_add_permission(self, request, obj=None): @@ -32,7 +33,6 @@ if not DEBUG: def has_delete_permission(self, request, obj=None): return False - admin.site.register(Proposicao, RestricaoAdmin) admin.site.register(TipoAutor, RestricaoAdmin) admin.site.register(TipoComissao, RestricaoAdmin)