Do I need PyISAPIe to run Django on IIS6?
It seems that all roads lead to using PyISAPIe to get Django working on IIS6. This becomes a problem for us because you need separate application pools per PyISAPIe / Django instance , which we would not want to do.
Does anyone have any tips / tricks or can they share their experiences (especially in shared Windows hosting environment)?
a source to share
You need separate application pools no matter which extension you are using. This is because application pools separate the handler libraries into different instances of the w3wp.exe process. You may be wondering why this is necessary:
Look at the setting module the Django: os.environ["DJANGO_SETTINGS_MODULE"]
. It's a process environment, so if you change it for one ISAPI handler and then later on another in the same application pool, they both point to the new one DJANGO_SETTINGS_MODULE
.
There is no good reason for this, so feel free to convince the Django developers that they don't need this :)
There are several ways to hack it, but nothing works quite as cleanly as separate application pools.
Unfortunately isapi-wsgi will not fix the Django issue and I recommend that you keep using PyISAPIe (disclaimer: I'm a developer!;)
a source to share
Django works great in any WSGI framework (just like any other modern Python web application framework), and there are several ways to run WSGI in IIS, for example. see http://code.google.com/p/isapi-wsgi/ .
a source to share