[kforge-dev] KForge with WSGI
John Bywater
john.bywater at appropriatesoftware.net
Sun Feb 21 20:00:11 UTC 2010
Hi Rufus,
Thought you would be interested to know that, after a little
investigation, it appears simple to serve "Kui" (the KForge UI) as a
WSGI application. Steps are:
1. Create a file (e.g. /path/to/service/wsgi/kforge.wsgi):
----------
import os, sys
sys.path.append('/path/to/system') # or activate a virtual env...
os.environ['DJANGO_SETTINGS_MODULE'] = 'kforge.django.settings.main'
import django.core.handlers.wsgi
os.environ['KFORGE_SETTINGS'] = '/path/to/service/etc/kforge.conf'
application = django.core.handlers.wsgi.WSGIHandler()
----------
2. Replace the entire "Kforge 'Django' section" of the KForge Apache
configuration file with:
-----------
WSGIScriptAlias / /path/to/service/wsgi/kforge.wsgi
-----------
3. Enable mod_wsgi. Restart Apache. That's it!
Still several practicalities, such as generation of the kforge.wsgi
file, and the separate matter of the conditional basic auth and other
handlers for project services.
But at least Kui appears to work perfectly well through WSGI.
Best wishes,
John.
More information about the kforge-dev
mailing list