Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1165505
  • 博文数量: 1310
  • 博客积分: 3980
  • 博客等级: 中校
  • 技术积分: 8005
  • 用 户 组: 普通用户
  • 注册时间: 2008-05-09 22:05
文章分类

全部博文(1310)

文章存档

2011年(1)

2008年(1309)

我的朋友

分类:

2008-11-09 16:01:37

This guide assumes you’ve already installed Eclipse, PyDev, Python and Django. It also assumes you’re using Eclipse 3.2, PyDev 1.2.4, Django 0.95 and Python 2.4.

  • Go to Window->Preferences->Preferences->PyDev->Python Interpretter and add the django source file to the PYTHONPATH settings.
  • Create a new PyDev pyhon project. Make sure you uncheck the ‘create src folder’ option.
  • Create project on the command line using django e.g. django-admin.py startproject mysite
  • In your newly created project directory create a src directory in it, and move the django generated source files here
  • In eclipse, right-click your project and select refresh
  • Right-click on the project and select Properties->PyDev – PYTHONPATH, and add your src folder to the project source settings

That should be it. I still get red underlines on the Django source imports even thought PyDev seems to know about them – to test this is working properly, open up your urls.py file and ctrl click on the patterns call – it should take you to defaults.py.

Now you can go ahead and create your database & super user.

Launching to built-in server

Open up manage.py and hit F9. This should print out the usage information for the server. To actually start the server, select Run->Run…, and in the Arguments tab for manage.py enter runserver—noreload. The noreload argument gives you output.

Thanks go to PyDev creator Fabio Zadrozny for his guide which got me going.



seal 2008-09-13 19:23 发表评论
阅读(258) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~