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
In my case I got this error when porting code from Django 1.11.11 to Django 2.2. I was defining a custom FileSystemStorage derived class. In Django 1.11.11 I was having the following line in models.py:
from django.core.files.storage import Storage, DefaultStorage
and later in the file I had the class definition:
class MyFileStorage(FileSystemStorage):
However, in Django 2.2 I need to explicitly reference FileSystemStorage class when importing:
from django.core.files.storage import Storage, DefaultStorage, FileSystemStorage
and voilà!, the error dissapears.
Note, that everyone is reporting the last part of the error message spitted by Django server. However, if you scroll up you will find the reason in the middle of that error mambo-jambo.