Django, PyISAPIe and IIS

November 3rd, 2008

For those poor souls, much like myself, who are forced to deploy Django on IIS.. I feel your pain. I spent the better part of my morning fixing a broken PyISAPIe. To shortcut your trek, here’s what I’ve found.

Signals have changed since the last release. To fix this, I altered the call to signals to directly call the signals instead of importing the signals module. I then updated the signal calls themselves to reflect the new style.

Another change in Django since the latest version of PyISAPIe was released is a conversion from path to path_info. This fix was easy enough. Just change to the following in PyISAPIeRequest.__init__ ::

This.path = This.path_info = Env.URL

The last issue was some errors involving multipart forms. Thanks to this post from http://kirit.com, I was able to solve that issue.

You can find a diff of my changes here or the entire file here.

Also be sure to check out Greg Neman, Brian Rosner , James Tauber, Adam Gomaa, Eric Florenzano, Eric Holsher, Patrick Altman, and Jannis Leidel for the post-a-day challenge.


Comments are disabled. If that bothers you, please contact me on twitter at @justinlilly and let me know.