Rebuild a mod_wsgi django project

If you are working on a project with the Django framework in wsgi mode, than after deployment of a change to production the project will not be automatically rebuilt.

I’ve lost a few hours because of this. The reason was the daemon on my production server. It would rebuild the project at arbitrary, at least to me, moments, and keep me wandering what is going on.

The solution turned out to be very simple. You can let the deamon know that your project needs rebuilding by simply changing the wsgi file, or changing it’s modification date (in linux you can accomplish this with the touch method).

My restart script is as simple as
touch /my/django.wsgi.

Leave a Reply

Your email address will not be published. Required fields are marked *


− 2 = five

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>