views:

289

answers:

1

I am using Lighttpd + FastCGI + Django on a dev machine. I start FastCGI server via manage.py's command line option.

Problem is that I do make changes to sources quite often and I need to get FastCGI to pick up those changes automatically, just as "./manage.py runserver" does.

Is there a command-line option for that, perhaps, or any other solutions?

+2  A: 

Have you looked at the code in the runserver part of manage.py that does the monitoring? I see no reason you could not just copy-paste that code into a custom manage.py script and set it to run the lighty restart command when changes were detected.

Alternatively, you could run a separate python program that did the restart using a package like pyinotify:

http://trac.dbzteam.org/pyinotify

Paul McMillan