views:

51

answers:

1

I need to run a django app on windows under either IIS6 or IIS7 (yes, I don't know the exact requirements right now).

What I did:
I've tried to set up a working environment on my windows 7 (so its IIS7 for now) machine. I've followed the instructions at django trac using PyISAPIe.

What came out of it:
Apparently, either I am doing something completely wrong, or the pyisapie.py handler, that I am supposed to put into django's core/handlers is very much incompatible with stable django (1.2). There are at least two things that it "does wrong":

  • it attempts to invoke request_started and request_finished signals using the outdated signatures, - I've fixed those.
  • its http.HttpRequest subclass (PyISAPIeRequest) doesn't conform to the HttpRequest interface, - path_info is left out. I suppose, it comes out of the environment, analogous to how the WSGIRequest does it. So I've hacked this in too.

I really have no idea what else will fail on me (apparently, it also has a problem with multipart forms) and, quite frankly, I am not prepared to accept a solution that might die on me at any moment in production (although, on a side note, I'd love to make the whole IIS+Django thing actually work).

Are there any other ways to run django on windows? Perhaps I can use a standalone server, like flup and use IIS as a reverse proxy (though, I don't know if it is possible at all)? I need the windows+basic authentication, - the application is supposed to use the remote user authentication backend, though authentication is not the sole reason why IIS has to be used.

I can't use another machine and I am against installing a full-blown web server (I could technically use apache+mod_wsgi). Performance/high availability will not be an issue, but one thing is certain, - large file uploads should be handled correctly (see above about multipart forms).

+1  A: 

Hello-

This is a cut and paste from my response on the mailing list. I suppose either here or there would be fine for further questions.

http://groups.google.com/group/pyisapie/browse_thread/thread/af7dac9398336e67?hl=en_US


The module isn't supported at all and the Django folks didn't get around to including it in the core, so it shouldn't be considered when trying to get PyISAPIe+Django working.

If you look in the Examples folder, you'll see some info on how to get it all set up with WSGI only, which is a better long-term solution.

Phillip Sitbon