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
as a noob using Python3 ,I find it might be an import error instead of a Django error
wrong:
from someModule import someClass
right:
from .someModule import someClass
this happens a few days ago but I really can't reproduce it...I think only people new to Django may encounter this.here's what I remember:
try to register a model in admin.py:
from django.contrib import admin
from user import User
admin.site.register(User)
try to run server, error looks like this
some lines...
File "/path/to/admin.py" ,line 6
tell you there is an import error
some lines...
Model class django.contrib.contenttypes.models.ContentType doesn't declare an explicit app_label
change user to .user ,problem solved