简体   繁体   English

无法在pydev中为django项目编写代码

[英]Unable to write code in pydev for django project

I am just the beginner in django. 我只是django的初学者。 I use pydev eclipse in windows 8. First I write a "Hello World " program and display the string in browser but when I changed the code the change in the output is not appear. 我在Windows 8中使用pydev eclipse。首先我编写一个“Hello World”程序并在浏览器中显示该字符串,但是当我更改代码时,输​​出中的更改不会出现。 Whatever I change nothing change in output. 无论我改变什么,输出都没有变化。 But when I close the eclipse and shutdown the computer and restart then I change the program and run it. 但是,当我关闭eclipse并关闭计算机并重新启动时,我会更改程序并运行它。 The code output is changed. 代码输出已更改。 But now further to change my program I again need to restart my computer. 但现在进一步改变我的程序我再次需要重新启动我的电脑。 What is happening ? 怎么了 ?

You can able to run by using short cut key [ ctrl + shift + F9] or by clicking on button inside blue circle below 您可以使用快捷键[ctrl + shift + F9]或单击下面蓝色圆圈内的按钮来运行 在此输入图像描述

尝试重启开发服务器

You should pass --noreload when you run the program to disable the autoreload (see http://pydev.org/manual_adv_django.html for details). 运行程序以禁用自动重载时,应该传递--noreload(有关详细信息,请参阅http://pydev.org/manual_adv_django.html )。

Note that if you want to use the autoreload feature, that same page has instructions on how to set things up for it to work. 请注意,如果要使用自动重载功能,则该页面会提供有关如何设置其工作的说明。

If you did a launch already, just kill the django-related python process in the task manager so that you can do a new launch properly (otherwise the old one keeps your socket open). 如果你已经启动了,只需在任务管理器中杀死与django相关的python进程,这样你就可以正确地进行新的启动(否则旧的启动会使你的套接字打开)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM