From 4efecbd03ccef5d175c29cd5e48ef0b2b5cada31 Mon Sep 17 00:00:00 2001 From: Marcio Mazza Date: Fri, 10 Oct 2014 18:11:09 -0300 Subject: [PATCH] Organize imports in some files --- sigi/apps/contatos/admin.py | 3 ++- sigi/apps/convenios/admin.py | 9 +++------ sigi/apps/diagnosticos/admin.py | 6 +++--- sigi/apps/financeiro/admin.py | 1 + sigi/apps/inventario/admin.py | 1 + sigi/apps/mesas/admin.py | 1 + sigi/apps/metas/admin.py | 3 ++- sigi/apps/parlamentares/admin.py | 6 ++---- sigi/apps/servicos/admin.py | 9 +++++---- sigi/apps/servidores/admin.py | 4 ++-- sigi/apps/utils/__init__.py | 3 ++- 11 files changed, 24 insertions(+), 22 deletions(-) diff --git a/sigi/apps/contatos/admin.py b/sigi/apps/contatos/admin.py index 646788c..644e051 100644 --- a/sigi/apps/contatos/admin.py +++ b/sigi/apps/contatos/admin.py @@ -1,9 +1,10 @@ # -*- coding: utf-8 -*- from django.contrib import admin + +from sigi.apps.contatos.filters import PopulationFilter from sigi.apps.contatos.models import (UnidadeFederativa, Municipio, Telefone, Contato) from sigi.apps.utils import queryset_ascii -from sigi.apps.contatos.filters import PopulationFilter class UnidadeFederativaAdmin(admin.ModelAdmin): diff --git a/sigi/apps/convenios/admin.py b/sigi/apps/convenios/admin.py index 6250017..307f7be 100644 --- a/sigi/apps/convenios/admin.py +++ b/sigi/apps/convenios/admin.py @@ -1,15 +1,12 @@ # -*- coding: utf-8 -*- from django.contrib import admin -from django.contrib.admin.views.main import ChangeList -from sigi.apps.convenios.models import Projeto, Convenio, EquipamentoPrevisto, Anexo, Tramitacao, UnidadeAdministrativa -from sigi.apps.casas.models import CasaLegislativa -from sigi.apps.servicos.models import Servico from django.http import HttpResponse, HttpResponseRedirect -from sigi.apps.convenios.reports import ConvenioReport -from sigi.apps.utils import queryset_ascii from geraldo.generators import PDFGenerator +from sigi.apps.convenios.models import Projeto, Convenio, EquipamentoPrevisto, Anexo, Tramitacao +from sigi.apps.convenios.reports import ConvenioReport from sigi.apps.convenios.views import adicionar_convenios_carrinho +from sigi.apps.utils import queryset_ascii class TramitacaoInline(admin.TabularInline): diff --git a/sigi/apps/diagnosticos/admin.py b/sigi/apps/diagnosticos/admin.py index 899373c..6b1bc13 100644 --- a/sigi/apps/diagnosticos/admin.py +++ b/sigi/apps/diagnosticos/admin.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- from datetime import datetime from django.contrib import admin +from django.db.utils import OperationalError, ProgrammingError from eav.admin import BaseEntityAdmin, BaseSchemaAdmin -from sigi.apps.diagnosticos.models import Diagnostico, Pergunta, Escolha, Equipe, Anexo, Categoria + from sigi.apps.diagnosticos.forms import DiagnosticoForm -from sigi.apps.contatos.models import UnidadeFederativa -from django.db.utils import OperationalError, ProgrammingError +from sigi.apps.diagnosticos.models import Diagnostico, Pergunta, Escolha, Equipe, Anexo, Categoria def publicar_diagnostico(self, request, queryset): diff --git a/sigi/apps/financeiro/admin.py b/sigi/apps/financeiro/admin.py index b5b47e9..0c04384 100644 --- a/sigi/apps/financeiro/admin.py +++ b/sigi/apps/financeiro/admin.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- from django.contrib import admin + from sigi.apps.financeiro.models import Desembolso diff --git a/sigi/apps/inventario/admin.py b/sigi/apps/inventario/admin.py index 341aed6..5216881 100644 --- a/sigi/apps/inventario/admin.py +++ b/sigi/apps/inventario/admin.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- from django.contrib import admin from django.contrib.contenttypes import generic + from sigi.apps.contatos.models import Contato, Telefone from sigi.apps.inventario.models import (Fornecedor, Fabricante, Equipamento, TipoEquipamento, ModeloEquipamento, diff --git a/sigi/apps/mesas/admin.py b/sigi/apps/mesas/admin.py index 5c23d31..021bfd1 100644 --- a/sigi/apps/mesas/admin.py +++ b/sigi/apps/mesas/admin.py @@ -2,6 +2,7 @@ from django.contrib import admin from django.http import HttpResponse from django.utils.html import escape + from sigi.apps.mesas.models import (Legislatura, Coligacao, ComposicaoColigacao, SessaoLegislativa, MesaDiretora, Cargo, MembroMesaDiretora) diff --git a/sigi/apps/metas/admin.py b/sigi/apps/metas/admin.py index e5dece0..2a12666 100644 --- a/sigi/apps/metas/admin.py +++ b/sigi/apps/metas/admin.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- from django.contrib import admin -from sigi.apps.metas.models import Meta, PlanoDiretor + +from sigi.apps.metas.models import PlanoDiretor class MetaAdmin(admin.ModelAdmin): diff --git a/sigi/apps/parlamentares/admin.py b/sigi/apps/parlamentares/admin.py index 0de99dd..f9b6e47 100644 --- a/sigi/apps/parlamentares/admin.py +++ b/sigi/apps/parlamentares/admin.py @@ -1,15 +1,13 @@ # -*- coding: utf-8 -*- -import string - from django.contrib import admin from django.contrib.contenttypes import generic -from django.http import HttpResponse, HttpResponseRedirect +from django.http import HttpResponseRedirect from sigi.apps.contatos.models import Telefone from sigi.apps.parlamentares.models import Partido, Parlamentar, Mandato from sigi.apps.parlamentares.views import adicionar_parlamentar_carrinho -from sigi.apps.utils.filters import AlphabeticFilter from sigi.apps.utils.base_admin import BaseModelAdmin +from sigi.apps.utils.filters import AlphabeticFilter class MandatosInline(admin.TabularInline): diff --git a/sigi/apps/servicos/admin.py b/sigi/apps/servicos/admin.py index 8482e4f..3f47711 100644 --- a/sigi/apps/servicos/admin.py +++ b/sigi/apps/servicos/admin.py @@ -1,13 +1,14 @@ # -*- coding: utf-8 -*- from django.contrib import admin -from sigi.apps.servicos.models import Servico, LogServico, CasaAtendida, TipoServico -from sigi.apps.casas.admin import FuncionariosInline -from django.http import Http404, HttpResponseRedirect +from django.core.urlresolvers import reverse from django.forms.models import ModelForm +from django.http import Http404, HttpResponseRedirect from django.utils.encoding import force_unicode from django.utils.translation import ugettext as _ -from django.core.urlresolvers import reverse + +from sigi.apps.casas.admin import FuncionariosInline from sigi.apps.casas.models import CasaLegislativa +from sigi.apps.servicos.models import Servico, LogServico, CasaAtendida, TipoServico class LogServicoInline(admin.StackedInline): diff --git a/sigi/apps/servidores/admin.py b/sigi/apps/servidores/admin.py index 144fa66..b0706ab 100644 --- a/sigi/apps/servidores/admin.py +++ b/sigi/apps/servidores/admin.py @@ -2,10 +2,10 @@ from django.contrib import admin from django.contrib.contenttypes import generic -from sigi.apps.utils.admin_widgets import AdminImageWidget -from sigi.apps.servidores.models import Servidor, Funcao, Licenca, Ferias, Servico, Subsecretaria from sigi.apps.contatos.models import Endereco, Telefone from sigi.apps.servidores.forms import FeriasForm, LicencaForm, FuncaoForm +from sigi.apps.servidores.models import Servidor, Funcao, Licenca, Ferias, Servico, Subsecretaria +from sigi.apps.utils.admin_widgets import AdminImageWidget from sigi.apps.utils.filters import AlphabeticFilter diff --git a/sigi/apps/utils/__init__.py b/sigi/apps/utils/__init__.py index c670bbb..3759510 100644 --- a/sigi/apps/utils/__init__.py +++ b/sigi/apps/utils/__init__.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- +from unicodedata import normalize + from django.contrib import admin from django.db import models -from unicodedata import normalize class SearchField(models.TextField):