python manage.py runserver不显示任何内容 [英] python manage.py runserver doesn't display anything

查看:1852
本文介绍了python manage.py runserver不显示任何内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我曾经使用过django,过去我从未遇到过这个问题,然后我转移了一段时间到Laravel(并确保我在窗户上做了很多我不记得的事情).

I used to work with django and I didn't face this problem in the past, Then I shifted for a while to Laravel ( and sure I changed a lot of things in the windows which I don't remember ).

,现在当我按下python manage.py runserver ..时,什么也没发生,外壳似乎挂了.当我点击crt + C时,将鼠标悬停.正常窗口突然出现:

and now when I hit python manage.py runserver .. nothing happen and the shell seems as it hanged . hover once I hit crt + C .the normal window suddenly appear that says :

您有15个未应用的迁移.您的项目可能无法正常运行 直到您为应用应用迁移:管理员,身份验证,内容类型, 会议.运行"python manage.py migration"以应用它们.一月08, 2019-14:16:30 Django 2.1.1版,使用设置 'django_project.settings'在以下位置启动开发服务器 http://127.0.0.1:8000/使用CTRL-BREAK退出服务器.

You have 15 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. January 08, 2019 - 14:16:30 Django version 2.1.1, using settings 'django_project.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CTRL-BREAK.

但是我可以转到 http://127.0.0.1:8000/,我有在django的欢迎页面上添加了此行在此处输入图片描述

However I am able to go to http://127.0.0.1:8000/ and I have the welcome page of django with this line added enter image description here

我知道这听起来很疯狂,请原谅我是我的新手和thanx

It sounds crazy I know , please excuse me cause I am a newbie and thanx in advance

推荐答案

看起来您必须应用迁移.

Looks like you've to apply migrations.

您只需要听他说的话:

python manage.py migrate

我认为最好在继续之前先阅读文档:您必须了解模型在Django中的工作方式. 首先先查看文档. 我的建议是遵循第一个应用"教程.在此处

I think it's better to look at the documentation before you proceed: you've to understand how models work in Django. Take a look to the documentation first. And my advice is to follow the "first app" tutorial. Go here

这篇关于python manage.py runserver不显示任何内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆