开发Django 1.6应用程序,并出现意外错误。我的代码中出现语法错误:
if:
# some stuff
if else:
# some more stuff
显然是错误,不是问题(应该只是else:
)。问题是,当我去运行我的测试时(在注意到问题之前),这是我收到的错误消息:
ƒ: python manage.py test
Creating test database for alias 'default'...
CommandError: One or more models did not validate:
member.company: 'mc' has a relation with model datamining.MergedCompany, which has either not been installed or is abstract.
member.headshotwithcoloredbg: 'question' has a relation with model contest.Question, which has either not been installed or is abstract.
据我所见,这与问题无关。出现错误的文件与验证失败的模型位于不同的应用程序中。真的没有联系。
我偶然注意到语法错误并修复它,但这种行为令人担忧。
有人可以解释为什么在这种情况下不会出现语法错误吗?这令人担忧,因为该消息几乎没有给出关于在哪里看或实际上出错的指导。
谢谢!