Hacker News new | ask | show | jobs
by fefzero 6144 days ago
Why should I use it (I'm especially interested in the Django case)?
3 comments

1. the primary maintainer of mod_wsgi is the primary maintainer of mod_python and his focus is on wsgi

2. WSGI is a standard interface defined for python programs in PEP 333 so you should in theory be able to run your program against the builtin wsgi server that ships in the standard library and get the same results as you would running it on any of the webservers that support the WSGI protocol

3. With mod_wsgi, you can easily restart a django app without restarting apache, by touching the wsgi file.
touching the settings file works as well, and almost all of the regular pages will be reloaded as well as soon as you've saved them.

Rarely do you have to do anything other then just saving the file.

Because it is now the preferred way of hooking up python to apache according to the Django docs, let me look it up for you....

edit:

from: http://docs.djangoproject.com/en/dev/howto/deployment/modpyt...

"The mod_python module for Apache can be used to deploy Django to a production server, although it has been mostly superseded by the simpler mod_wsgi deployment option."

which points you to:

http://code.djangoproject.com/wiki/django_apache_and_mod_wsg...

It's faster and more robust. We switched to it on production and don't regret in a slightest.