Django manage.py runserver无法打开浏览器 [英] Django manage.py runserver doesn't open browser

查看:82
本文介绍了Django manage.py runserver无法打开浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从Django书中开始使用Django,尝试通过运行服务器访问127.0.0.1:8000时遇到了麻烦:它无法打开任何页面!

I am starting Django with The Django book, and I got stuck while trying to visit 127.0.0.1:8000 with run server: it doesn't open any page!

我所做的是:

python manage.py runserver 8000

我明白了:

Django version 1.6.8, using settings 'mysite.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

一切似乎都是正确的,但是我的浏览器(Google Chrome)中没有打开任何东西.

Everything seems to be right, but nothing is open in my browser (Google Chrome).

谁能告诉我为什么?

推荐答案

Django默认未打开浏览器,您应该自己打开浏览器并访问 http://127.0.0.1:8000

Django did not open your browser by default, you should do it yourself by open it and visit http://127.0.0.1:8000

如果使用像Pycharm这样的IDE,则可以通过在每次重新启动时选中 Run browser 来打开它来对其进行配置.

If you use IDE like Pycharm, you can config it by check the Run browser to open it each time you restart.

这篇关于Django manage.py runserver无法打开浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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