在django 1.7中进行迁移时出错

在django 1.7中进行迁移时出错,django,django-models,Django,Django Models,当我进行makemigrations项目时,一切正常,之后当我尝试进行migration时,就会出现错误。这是怎么发生的?请帮忙 =========ERROR MESSAGE=================== Operations to perform: Apply all migrations: projects, profiles, auth, admin, sessions, polls, contenttypes Running migrations: Applying p

当我进行makemigrations项目时,一切正常,之后当我尝试进行migration时,就会出现错误。这是怎么发生的?请帮忙

=========ERROR MESSAGE===================

Operations to perform:
  Apply all migrations: projects, profiles, auth, admin, sessions, polls, contenttypes
Running migrations:
  Applying projects.0001_initial...Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Django-1.7-py3.4.egg/django/apps/config.py", line 158, in get_model
    return self.models[model_name.lower()]
KeyError: 'project'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Django-1.7-py3.4.egg/django/db/migrations/state.py", line 79, in render
    model = self.apps.get_model(lookup_model[0], lookup_model[1])
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Django-1.7-py3.4.egg/django/apps/registry.py", line 202, in get_model
    return self.get_app_config(app_label).get_model(model_name.lower())
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Django-1.7-py3.4.egg/django/apps/config.py", line 161, in get_model
    "App '%s' doesn't have a '%s' model." % (self.label, model_name))
LookupError: App 'projects' doesn't have a 'project' model.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Django-1.7-py3.4.egg/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Django-1.7-py3.4.egg/django/core/management/__init__.py", line 377, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Django-1.7-py3.4.egg/django/core/management/base.py", line 288, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Django-1.7-py3.4.egg/django/core/management/base.py", line 338, in execute
    output = self.handle(*args, **options)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Django-1.7-py3.4.egg/django/core/management/commands/migrate.py", line 160, in handle
    executor.migrate(targets, plan, fake=options.get("fake", False))
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Django-1.7-py3.4.egg/django/db/migrations/executor.py", line 63, in migrate
    self.apply_migration(migration, fake=fake)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Django-1.7-py3.4.egg/django/db/migrations/executor.py", line 97, in apply_migration
    migration.apply(project_state, schema_editor)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Django-1.7-py3.4.egg/django/db/migrations/migration.py", line 107, in apply
    operation.database_forwards(self.app_label, schema_editor, project_state, new_state)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Django-1.7-py3.4.egg/django/db/migrations/operations/models.py", line 33, in database_forwards
    apps = to_state.render()
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Django-1.7-py3.4.egg/django/db/migrations/state.py", line 89, in render
    model=lookup_model,
ValueError: Lookup failed for model referenced by field projects.Likes.project: projects.Project
==========错误消息===================
要执行的操作:
应用所有迁移:项目、配置文件、身份验证、管理、会话、轮询、内容类型
运行迁移:
正在应用项目。0001_初始…回溯(最近一次调用最后一次):
get_模型中的文件“/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site packages/Django-1.7-py3.4.egg/Django/apps/config.py”,第158行
返回self.models[model_name.lower()]
KeyError:“项目”
在处理上述异常期间,发生了另一个异常:
回溯(最近一次呼叫最后一次):
文件“/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site packages/Django-1.7-py3.4.egg/Django/db/migrations/state.py”,第79行,呈现
model=self.apps.get\u model(查找模型[0],查找模型[1])
get_模型中的文件“/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site packages/Django-1.7-py3.4.egg/Django/apps/registry.py”,第202行
返回self.get\u app\u config(app\u标签)。get\u model(model\u name.lower())
get_模型中的文件“/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site packages/Django-1.7-py3.4.egg/Django/apps/config.py”,第161行
应用程序“%s”没有“%s”模型。“%(self.label,模型名称))
LookupError:应用程序“项目”没有“项目”模型。
在处理上述异常期间,发生了另一个异常:
回溯(最近一次呼叫最后一次):
文件“manage.py”,第10行,在
从命令行(sys.argv)执行命令
文件“/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site packages/Django-1.7-py3.4.egg/Django/core/management/_uuuinit_uuuuuuuu.py”,第385行,从命令行执行
utility.execute()
文件“/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site packages/Django-1.7-py3.4.egg/Django/core/management/__init___;.py”,第377行,执行
self.fetch_命令(子命令)。从_argv(self.argv)运行_
文件“/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Django-1.7-py3.4.egg/Django/core/management/base.py”,第288行,从_argv开始运行
self.execute(*args,**选项._dict__;
文件“/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site packages/Django-1.7-py3.4.egg/Django/core/management/base.py”,执行中第338行
输出=self.handle(*args,**选项)
handle中第160行的文件“/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site packages/Django-1.7-py3.4.egg/Django/core/management/commands/migrate.py”
executor.migrate(目标、计划、假=options.get(“假”,假))
文件“/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site packages/Django-1.7-py3.4.egg/Django/db/migrations/executor.py”,第63行,在migrate中
self.apply\u迁移(迁移,假=假)
文件“/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site packages/Django-1.7-py3.4.egg/Django/db/migrations/executor.py”,第97行,在应用程序迁移中
应用(项目状态,模式编辑器)
文件“/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site packages/Django-1.7-py3.4.egg/Django/db/migrations/migration.py”,第107行,适用于
数据库转发(self.app\u标签、模式编辑器、项目状态、新状态)
数据库中的第33行文件“/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site packages/Django-1.7-py3.4.egg/Django/db/migrations/operations/models.py”
apps=to_state.render()
文件“/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site packages/Django-1.7-py3.4.egg/Django/db/migrations/state.py”,第89行,呈现
模型=查找模型,
ValueError:字段projects.Likes引用的模型的查找失败。项目:projects.project

实例项目类似乎有问题。但是问题出在哪里我也有同样的问题。也粘贴模型代码