Django端口更改 [英] Django port changing

查看:368
本文介绍了Django端口更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在localhost:8000上启动Django服务器,并且一切正常,但是在单击不同的选项卡后,它将端口更改为localhost:8002/othertab,如何将8000设置为默认端口?

I've started Django server on localhost:8000 and everything wold be okay, but after clicking on different tabs it changes port to localhost:8002/othertab, how can I set 8000 for default port?

推荐答案

如果要更改服务器的IP,请将其与端口一起传递.因此,要侦听所有公共IP(如果您想炫耀在其他计算机上的工作很有用),请使用:

If you want to change the server’s IP, pass it along with the port. So to listen on all public IPs (useful if you want to show off your work on other computers), use:

 $python manage.py runserver 127.0.0.1:8002

有关更多详细信息,请单击此处.

For more details click here .

这篇关于Django端口更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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