0
Hello, I’m not getting the import
of this model
have the model:
class Contrato(models.Model):
within models.py
and inside my serializers.py need to do import
from models import Contrato
nor
from apps.contratos.models import Contrato
Nothing works, other apps work smoothly.
Pass only app and model
from myapp.models import Contrato
– jpklzm
Check your
PYTHONPATH
, the import path needs to be found relative to it. If the folderapps
is on PYTHONPATH, sofrom contratos.models import Contrato
should work.– mgibsonbr