views:

1043

answers:

3
+1  Q: 

Django in Eclipse

The book I've been reading about Django mandates heavy usage of a command line in terms of installing Python and importing Django. It details which command line commands are necessary, both from the command line itself and from a python shell, in order to create a new project, start a web server, perform synchronization of models to a database, and so forth. I also have Eclipse which I use for Ruby on Rails. And it contains a PyDev plug in. Is there a GUI way via Eclipse in order that I needn't constantly have a DOS window open?

+1  A: 

Some of the admin tasks like creating projects or syncing the database are best done from the command line. Personally, I like to define a bunch of shell aliases--like these: http://ramin.firoozye.com/2008/03/03/django-bash-shell-shortcuts/ so I don't have to remember to type all that stuff.

But you can use PyDev and Eclipse to start up the server -- which makes it easy to set breakpoints and step through the code. Once configured, you can just hit the 'debugger' button and it launches the Django server and waits for you to hit it.

Here are instructions on how to configure Pydev for Django use:

http://pydev.blogspot.com/2006/09/configuring-pydev-to-work-with-django.html

EDIT: I missed that you were talking about DOS. You can get the same effect as shell aliases by using batch files and environment variables. Or use Cygwin and get a bash shell.

Ramin
A: 

Can you set up a separate script in eclipse to use subprocess.popen to run the commands you need to then wait for input to kill the child process?

+1  A: 

You can use Komodo Edit... In this IDE you can set-up a lot of commands...

I´ve posted an tuto in my blog, but it´s in portuguese... If you want, i can send you a .doc file. Then you can use google translator!

http://chevitarese.wordpress.com.br

Fred Chevitarese - GNU/Linux

fchevitarese