I\'m at wit\'s end. After a dozen hours of troubleshooting, probably more, I thought I was finally in business, but then I got:
Model class django.contrib.co
I got this error on importing models in tests, i.e. given this Django project structure:
|-- myproject
|-- manage.py
|-- myproject
|-- myapp
|-- models.py # defines model: MyModel
|-- tests
|-- test_models.py
in file test_models.py
I imported MyModel
in this way:
from models import MyModel
The problem was fixed if it is imported in this way:
from myapp.models import MyModel
Hope this helps!
PS: Maybe this is a bit late, but I not found in others answers how to solve this problem in my code and I want to share my solution.