更改 pydev 中的端口
大家好,我正在尝试学习 django 框架,并且正在使用 PyDev(Eclipse Python 开发框架/插件)。当我尝试运行我的应用程序时,出现错误:
Error: [Errno 10013]
我知道这是由于端口造成的。我使用端口 8000,我想将其更改为 8080。有谁知道我到底应该做什么来更改端口?
pydev debugger: starting
Validating models...
0 errors found
Django version 1.3.1, using settings 'muapp.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
Error: [Errno 10013]
指出 PyDev 与 Eclipse 一样,在按下 Run
按钮时运行配置的命令可能会很有用。默认命令和/或其选项如何更改?
Hi everyone i'm trying to learn the django framework and I'm using PyDev (Eclipse Python Development Framework/Plugin). When I try to run my application I get an error:
Error: [Errno 10013]
I know that this is because of the port. I use the port 8000 and i want to change it to 8080. Does anyone knows what exactly should i do to change the port?
pydev debugger: starting
Validating models...
0 errors found
Django version 1.3.1, using settings 'muapp.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
Error: [Errno 10013]
It might be useful to point out that PyDev, like Eclipse, runs the configured command when the Run
button is pressed. How is the default command and/or its options changed?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
观看此视频教程。跳过大约 14 分钟。然后在参数中使用 runserver 8080 而不是 runserver。
Have a look at this video tutorial. Skip about 14 minutes in. Then use runserver 8080 instead of runserver in the arguments.
请查看 PyDev 文档,了解如何更改运行 配置。
作为 Django 运行/调试
无论是“Eclipse”还是“PyDev”,右键单击项目并选择“Run As”--> “运行配置...”
另外,根据 django 文档,
因此,在项目的运行配置中的参数选项卡上,只需添加:
这应该让服务器侦听所有接口/IP。或者,您可以使其更具体地针对您的面向公众的 IP:
请注意,在这种情况下,我的 IP 将为“123.456.789.123”,端口将为“45678”。
以下答案也可能有用:
如何公开 Django 的开发服务器?通常可能吗?
我怎样才能得到正在运行的服务器 URL
外部链接;第三方博客文章
Please take a look at the PyDev Documentation on how to change the Run configuration.
Run/Debug as Django
Whether it's "Eclipse" or "PyDev", right-click on the Project and select "Run As" --> "Run Configurations..."
Additionally, according to the django Documentation,
Therefore, in your Project's Run Configuration, on the Arguments tab, simply add:
This should have the server listen on all interfaces/IPs. Alternatively, you can make it more specific to your public-facing IP instead:
Please, note that in this case, my IP would be "123.456.789.123" and the port would be "45678".
The following Answers might also be of use:
How to make Django's devserver public ? Is it generaly possible?
How can i get the running server URL
External Link; Third-party blog-post