python manage.py runserver命令未给出任何响应。当我在输入命令后按Enter键时,我唯一得到的是:
HP@LAPTOP-3446CCM0 MINGW64 ~/downloads/src7/src7/mysite
$ python manage.py runserver
Watching for file changes with StatReloader
此后什么都没有出现在屏幕上。但是,当我按CTRL+C
时,屏幕上会出现类似这样的内容:
$ python manage.py runserver
Watching for file changes with StatReloader
Performing system checks...
System check identified no issues (0 silenced).
You have 17 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.
May 29, 2020 - 15:38:05
Django version 3.0.6, using settings 'mysite.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
如何克服这个问题
答案 0 :(得分:0)
服务器正常工作,请在浏览器中访问http://127.0.0.1:8000/进行查看。
该消息告诉您需要在数据库上运行迁移。运行python manage.py migrate
,它将设置您的数据库并删除该控制台输出
编辑:要删除统计重新加载器,您需要使用以下命令运行服务器:python manage.py runserver --noreload