小编Die*_*nte的帖子

卸载应用程序 A,因为应用程序 B 在一次旧迁移中具有依赖项

我正在尝试卸载名为 的应用程序django-cities,但在我的应用程序“位置”中,我有一个名为 的模型Venue,在迁移中该0001_initial.py模型的ForeingKeytocities.Subregion模型为django-cities

我继续删除django-citiesINSTALLED_APPS但出现以下错误:

Traceback (most recent call last):
  File "/home/d/.virtualenvs/beplay/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 227, in wrapper
    fn(*args, **kwargs)
  File "/home/d/.virtualenvs/beplay/local/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 128, in inner_run
    self.check_migrations()
  File "/home/d/.virtualenvs/beplay/local/lib/python2.7/site-packages/django/core/management/base.py", line 422, in check_migrations
    executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
  File "/home/d/.virtualenvs/beplay/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 20, in __init__
    self.loader = MigrationLoader(self.connection)
  File "/home/d/.virtualenvs/beplay/local/lib/python2.7/site-packages/django/db/migrations/loader.py", line 52, in __init__
    self.build_graph()
  File "/home/d/.virtualenvs/beplay/local/lib/python2.7/site-packages/django/db/migrations/loader.py", line 274, in build_graph
    raise exc
django.db.migrations.exceptions.NodeNotFoundError: Migration places.0001_initial dependencies reference nonexistent parent …
Run Code Online (Sandbox Code Playgroud)

python django django-models django-migrations

4
推荐指数
1
解决办法
1923
查看次数

标签 统计

django ×1

django-migrations ×1

django-models ×1

python ×1