views:

62

answers:

1

This is a nagging issue that I've had with Django.

Compared to a typical PHP site, it takes forever to refresh and see any changes I've made. During development I have Apache set to MaxRequestsPerChild 1 - this is fairly slow but is necessary because you end up viewing 'stale' code without it. Running the development server is far worse as it restarts and churns away after a one-liner change.

With PHP, changes are instantaneous.

Is there any way to accelerate this on the Django side?

+2  A: 

For development, it's rarely useful to be running Django behind a "real" web server like Apache. I understand the frustration with the auto-reloading dev server, but you can always give the --noreload option if you want to control the restarting yourself. I leave it on because I forget to restart, and the time that it saves me is usually worth a couple frustrating moments while editing.

However, I've never found the development server being the hinderance. Use SQLite while developing. Setting up a "real" database is usually not necessary when coding and testing. And templates will always refresh instantaneously.

Quartz
The dev server tends to go bonkers on me sometimes too. It'll quit sporadically, meanwhile I'm refreshing a page wondering why the site isn't coming up :)
Koobz
It only dies on syntax and similar errors. I never had any problems with dev server it self.
rebus
I agree that for development the development server is the thing to go for. Just gives me troubles if I'm testing with different browsers at once, since it can only handle one request at a time!
lazerscience
Another vote for dev server -- it makes life *much* easier.
Peter Rowell