You have 13 unapplied migration(s). Your project may not work properly until you apply ...报错

[root@gpu hello]# python manage.py runserver 0.0.0.0:8000
Performing system checks…

System check identified no issues (0 silenced).

You have 13 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run ‘python manage.py migrate’ to apply them.

March 01, 2018 - 14:48:45
Django version 1.11.8, using settings ‘hello.settings’
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.


解决方法:

执行一下这个:python manage.py migrate

它可以让我们在修改Model后可以在不影响现有数据的前提下重建表结构。

你可能感兴趣的:(python,bug)