Python 导致模型验证警告的语法错误

Python 导致模型验证警告的语法错误,python,django,testing,syntax,Python,Django,Testing,Syntax,开发Django 1.6应用程序时,出现意外错误。我的代码中有一个语法错误: if: # some stuff if else: # some more stuff 显然是一个错误,这不是问题所在(应该是否则:)。问题是,当我开始运行测试时(在注意到问题之前),我得到的错误消息是: ƒ: python manage.py test Creating test database for alias 'default'... CommandError: One or more mo

开发Django 1.6应用程序时,出现意外错误。我的代码中有一个语法错误:

if:
    # some stuff
if else:
    # some more stuff
显然是一个错误,这不是问题所在(应该是
否则:
)。问题是,当我开始运行测试时(在注意到问题之前),我得到的错误消息是:

ƒ: 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.
据我所知,这与问题无关。出现错误的文件位于与验证失败的模型不同的应用程序中。真的没有联系

不久之后,我碰巧注意到语法错误并修复了它,但这种行为令人担忧

有人能解释一下为什么在这种情况下没有出现语法错误吗?这是令人担忧的,因为这条信息对于在哪里寻找或者什么是真正的错误提供了很少的指导


谢谢

您在这里提供的信息不多。我猜给你一个验证错误的应用程序是在有这个语法错误的应用程序之前加载的。你到底在哪里有这个语法错误(请显示更多代码)?谢谢