python manage.py runserver不显示任何内容

编程入门 行业动态 更新时间:2024-10-27 08:40:08
本文介绍了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'在以下位置启动开发服务器 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 127.0.0.1:8000/ Quit the server with CTRL-BREAK.

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

However I am able to go to 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不显示任何内容

本文发布于:2023-10-28 08:48:15,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1536141.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:内容   manage   python   runserver   py

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!