django错误-You have 18 unapplied migration(s). Your project may not work properly until you apply the

django错误-You have 18 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.

错误截图

django错误-You have 18 unapplied migration(s). Your project may not work properly until you apply the_第1张图片

我在设置用户名称密码时发生此错误

python manage.py createsuperuser

解决方法

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

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

django错误-You have 18 unapplied migration(s). Your project may not work properly until you apply the_第2张图片

之后执行命令就没有错误了

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