0
我有一個數據庫正在被我的django項目和一個php項目使用。所以現在我要添加另一個單獨的django項目,它將使用相同的數據庫。使用相同數據庫的兩個Django項目
設置項目後,我寫了models.py,當我試圖運行服務器它給錯誤: -
System check identified no issues (0 silenced).
Unhandled exception in thread started by <function wrapper at 0x7fcedb0338c0>
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/django/utils/autoreload.py", line 226, in wrapper
fn(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/runserver.py", line 117, in inner_run
self.check_migrations()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/runserver.py", line 163, in check_migrations
executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/executor.py", line 20, in __init__
self.loader = MigrationLoader(self.connection)
File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/loader.py", line 49, in __init__
self.build_graph()
File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/loader.py", line 299, in build_graph
parent = self.check_key(parent, key[0])
File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/loader.py", line 160, in check_key
raise ValueError("Dependency on app with no migrations: %s" % key[0])
ValueError: Dependency on app with no migrations: apiapp
這不是讓我運行python manage.py遷移。
如何應對這類問題。
你見過:https://code.djangoproject.com/ticket/23366 – Nevertheless