04/2: django and wsgi
Running django under wsgi wasn’t hard … You make a script called xxx.wsgi, and it has a function called ‘application’ that is the entry point to your application. Django supplies an entry point called @django.core.handlers.wsgi.WSGIHandler()@, so you just have to:
application = django.core.handlers.wsgi.WSGIHandler()
(with a little setup beforehand)
You also should configure Apache to handle the appropriate URL location with mod wsgi:
WSGIScriptAlias /cp /home/bjb/work/credil-bjb/clientportal/wsgi/clientportal.wsgi
There was a little more stuff so that apache would serve some files statically (what django calls the “media” files and “static” files), but that was standard apache config. The other thing is to enable the wsgi module, and (because I’m using django auth) ensure that all the right modules are loaded and all the wrongs ones are disabled.
I started with this documentation (found a pointer to a parent page in the django docs): http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide