[英]How do debug Django validation, can't find related object
我有错误:
Error: One or more models did not validate:
auth.permission: 'content_type' has a relation with model <class 'django.contrib.contenttypes.models.ContentType'>, which has either not been installed or is abstract.
我没有在包中的任何地方看到django.contrib.contenttypes.models.ContentType上的引用。
即使所有模型都用逗号分隔,我也会收到此错误。
我多次引用用户,但是为什么会出现content_type错误?
的Django = 1.4.2
编辑:因为人们认为我的模块名为auth,所以在整个项目中存在以下位置:
models.py
2: from django.contrib.auth.models import User
settings.py
94: 'django.contrib.auth.middleware.AuthenticationMiddleware',
112: 'django.contrib.auth',
在设置INSTALLED_APPS下
'django.contrib.contenttypes',
失踪。 从jro到票证的链接很有帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.