This is IIS7. I've updated the handler to be a "wildcard script
manager" and updated the Isapi.py script to:
import os
import sys
from Http.WSGI import RunWSGI
from Http import Env
sys.path = [
'c:\project\site',
'c:\project\site\lib',
'c:\project\site\project'
] + sys.path
from django.core.handlers.wsgi import WSGIHandler as DjangoHandler
os.environ["DJANGO_SETTINGS_MODULE"] = 'project.settings'
Base = '/'
def Request():
PathInfo = Env.PATH_INFO
return RunWSGI(DjangoHandler(), Base=Base)
This seem to work much better. At least now I'm looking at a stack
trace instead of just a 500!
Now, I need to figure out why it can't load my database backend.
Isapi.py seems to be mangling the Django errors.
I'm getting this:
django.template.TemplateSyntaxError: Caught ImproperlyConfigured while
rendering: 'django.db.backends.postgresql_psycopg2' isn't an available
database backend.
Try using django.db.backends.XXX, where XXX is one of:
'dummy', 'mysql', 'oracle', 'postgresql', 'postgresql_psycopg2',
'sqlite3'
Error was: cannot import name utils
Is there some reason it doesn't show the default Django error handler?