我做过一些Django开发,但都是在文本编辑器中完成的。我很好奇其他人在Django开发中使用了什么更高级的开发工具。

我习惯使用Visual Studio进行开发,非常喜欢它提供的智能感知、代码补全和文件组织,希望能在Django/Python环境中找到一些(或工具组合)可以提供这些功能的东西。


当前回答

现在你也可以使用Visual Studio 2010了。方法如下:

Download and install Python Tools for Visual Studio. Create a new project from existing code (menu File → New → Project From Existing Code...) Specify your Django project folder and use the defaults. Right-click on manage.py and choose Set as Startup File. In your project properties Debug tab, add "runserver" in Script Arguments. You can set break points, and attach to the Python process for debugging. If you want to debug without having to "attach to process," use "runserver --noreload" in your script arguments. However, the "--noreload" means you'll have to stop and restart the Django development web server manually (to recognize your code changes).

如果您已经使用Visual Studio,这是一个很好的设置。

Python工具已经更新。它现在已经内置了对Django的支持。

其他回答

PyCharm,绝对。我几乎都试过了,但我发现对于任何繁重的开发来说,PyCharm是最有用的。

简单来说,有一次,我使用任何想到的脚本(TextMate, Vim, Emacs, TextWrangler,等等,你能想到的)。

现在你也可以使用Visual Studio 2010了。方法如下:

Download and install Python Tools for Visual Studio. Create a new project from existing code (menu File → New → Project From Existing Code...) Specify your Django project folder and use the defaults. Right-click on manage.py and choose Set as Startup File. In your project properties Debug tab, add "runserver" in Script Arguments. You can set break points, and attach to the Python process for debugging. If you want to debug without having to "attach to process," use "runserver --noreload" in your script arguments. However, the "--noreload" means you'll have to stop and restart the Django development web server manually (to recognize your code changes).

如果您已经使用Visual Studio,这是一个很好的设置。

Python工具已经更新。它现在已经内置了对Django的支持。

我自己喜欢Eclipse + PyDev和/或eric。PyDev的新版本提供了一些非常棒的代码补全支持。

因为我只在PyDev中使用Eclipse,所以我只使用了平台运行时二进制+ PyDev + Subclipse的简单安装。

NetBeans for Python是我目前的最爱(我发现它比Eclipse更轻便,安装起来也容易得多)。支持简单的重构,自动补全,错误/警告…

Eclipse Aptana PyDev可能是当今最完整的免费IDE之一(还没有测试很多)

Wingware Python IDE是一个商业IDE,它有一些Django特定的项目设置功能,可以调试Django模板文件。

IntelliJ IDEA终极版是另一个商业IDE,它也有一个正在大力开发的Python插件。我看到了一些演示,看起来很有前途的自动完成(模板和Python)。

Vim,我仍然使用一个小的触摸修复应用程序。参见:Django的额外调整。

我使用Eclipse和Pydev也获得了很好的结果。尽管我仍然需要一个打开到项目目录的shell来运行manage.py命令。我还将它与Bazaar插件一起用于版本控制和与服务器同步代码。