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

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


当前回答

我使用科莫多编辑器。查看打开科莫多编辑。

其他回答

我也用凯特。凯特的简单是它最大的特点。它不会妨碍你。(当然,这是非常主观的观点。)

Kate包含一个Python代码浏览器插件。但在我看来,这没什么用。当您更改代码/视图时,不会自动更新。此外,当您更新时,整个树将被折叠,您必须自己再次展开它。点击次数太多。

相反,我使用Pâté附带的Source Browser插件。它有时确实会让凯特暂时冻结,但目前为止还没有崩溃或类似的情况。

不要脸的博客插件:更多关于与Kate一起使用Django (Pâté)

现在你也可以使用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的支持。

安装了Django和Django -html包的TextMate为您提供了语法高亮显示和出色的可扩展性。它重量轻,使用起来很有趣。

这里有一个链接,指向一个使用Python的TextMate代码补全项目(我自己没有用过)。至于“智能感知”(我理解为内联文档引用),TextMate也有。

Visual Studio有一个实际的Python扩展:http://pytools.codeplex.com/。这真是太棒了。感觉就像我在用任何原生Visual Studio语言编码一样。这个扩展甚至可以与Django兼容。最棒的是:它是完全免费的。即使是Visual Studio,它也只需要Visual Studio Shell就可以工作,这是完全免费的。

我使用Eclipse和普通的PyDev。Django没有任何特定的功能。我想到的最好的办法是建立一个运行概要文件来运行开发web服务器。

如果您添加web工具项目(WTP),您将在模板中得到语法高亮显示,但没有与特定模板语言相关的内容。PyDev是一个不错的插件,如果您已经熟悉Eclipse并在其他项目中使用它,那么它是一个不错的选择。

我记得NetBeans开始获得Python支持,但我不知道它现在在哪里。很多人对NetBeans 6赞不绝口,但在Java世界中,Eclipse仍然是OSS ide的王者。

Update: LiClipse is also fantastic for Django. Install it, use this method to get the icon into Ubuntu's menu. Start LiClipse and in File > New > Project ..., select PyDev and PyDev Django project. You may have to set up your Python interpreter etc, but that you'll be able to figure out on your own. Once the Django project is created, you can right click on the project and the menu will have a "Django" option, which allows various things like creating a Django app or running migrations etc. LiClipse is good because it consumes far lesser memory than PyCharm and supports refactoring and autocomplete reasonably well.