Browse Source

Arruma imports

Signed-off-by: Luciano Almeida <lucianoalmeida@interlegis.leg.br>
pull/329/head
Luciano Almeida 9 years ago
parent
commit
8edb5ed0d7
  1. 3
      base/admin.py
  2. 5
      base/models.py
  3. 6
      legacy/migration.py

3
base/admin.py

@ -1,6 +1,7 @@
from sapl.utils import register_all_models_in_admin
from django.contrib import admin
from base.models import ProblemaMigracao
from sapl.utils import register_all_models_in_admin
register_all_models_in_admin(__name__)

5
base/models.py

@ -1,7 +1,8 @@
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.utils.translation import ugettext_lazy as _
from sapl.utils import UF

6
legacy/migration.py

@ -7,11 +7,10 @@ from django.apps.config import AppConfig
from django.core.exceptions import ObjectDoesNotExist
from django.core.urlresolvers import reverse
from django.db import connections, models
from django.db.models import CharField, ForeignKey, TextField
from django.db.models import CharField, TextField
from django.db.models.base import ModelBase
from model_mommy import mommy
from model_mommy.mommy import make, foreign_key_required
from model_mommy.mommy import foreign_key_required, make
from base.models import ProblemaMigracao
from comissoes.models import Composicao, Participacao
@ -448,7 +447,6 @@ def check_app_no_ind_excluido(app):
def make_with_log(model, _quantity=None, make_m2m=False, **attrs):
all_fields = model._meta.get_fields()
fields_dict = get_fields_dict(model)
stub = make(model, _quantity, make_m2m, **fields_dict)
problema = 'Um stub foi necessário durante a criação de um outro stub'

Loading…
Cancel
Save