详细错误提示:
Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/django/utils/autoreload.py", line 228, in wrapper fn(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/runserver.py", line 128, in inner_run self.check_migrations() File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 422, 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 52, in __init__ self.build_graph() File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/loader.py", line 223, in build_graph self.add_external_dependencies(key, migration) File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/loader.py", line 188, in add_external_dependencies parent = self.check_key(parent, key[0]) File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/loader.py", line 169, in check_key raise ValueError("Dependency on app with no migrations: %s" % key[0]) ValueError: Dependency on app with no migrations: UserManagement
解决办法:
manage.py makemigrations UserManagement
为UserManagement创建迁移
相关文档介绍:https://docs.djangoproject.com/en/1.7/topics/migrations/#s-custom-fields