我在notifications
应用程序中有一个模型。在
class Notification(models.Model):
name = models.CharField(max_length = 255, primary_key = True)
description = models.CharField(max_length = 255)
以及Server
应用程序中的另一个模型。在
即使我从通知应用程序导入模型,我仍然收到一个错误消息
Unhandled exception in thread started by <function wrapper at 0x7fb523bad0c8>
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/django/utils/autoreload.py", line 93, in wrapper
fn(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/django/core/management/commands/runserver.py", line 101, in inner_run
self.validate(display_num_errors=True)
File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 314, in validate
raise CommandError("One or more models did not validate:\n%s" % error_text)
django.core.management.base.CommandError: One or more models did not validate:
servers.servernotificationmapping: 'notification' has a relation with model Notification, which has either not been installed or is abstract.
尝试(使用实际类名而不是字符串):
相关问题 更多 >
编程相关推荐