在过去的一个小时里,我一直在尝试解决这个问题,但我不知道我遗漏了什么。这是第一次没有以前的数据的项目。但是,当我尝试通过管理面板添加数据时,出现以下错误:
DatabaseError at /admin/judge/event/
relation "judge_event" does not exist
LINE 1: SELECT COUNT(*) FROM "judge_event"
^
Request Method: GET
Request URL: http://127.0.0.1:8012/admin/judge/event/
Django Version: 1.4.3
Exception Type: DatabaseError
Exception Value:
relation "judge_event" does not exist
LINE 1: SELECT COUNT(*) FROM "judge_event"
我的模型供参考:
class Event(models.Model):
competition_start = models.DateTimeField()
competitors = models.ManyToManyField('Picture')
results = models.CommaSeparatedIntegerField(max_length=20)
class Picture(models.Model):
uploader = models.ForeignKey(UserProfile)
upload_date = models.DateTimeField()
image = models.ImageField(upload_to="media")
score = models.DecimalField(max_digits=10,decimal_places=10)
score_RD = models.DecimalField(max_digits=10,decimal_places=10)
rated = models.BooleanField()
last_competed = models.DateTimeField()
competition = models.OneToOneField(Event)
我三次检查了所有笔记,并没有注意到我做了什么不同的事情。
“judge_event”应该是“judge_Event”吗?