4đź‘Ť
Django is WSGI-based framework so as soon as IIS get proper WSGI handling there should be no problem in running Django under this environment. Anything that connects WSGI and IIS will do.
Quick googling reveals some project on Google Code.
4đź‘Ť
Take a look at Helicon Zoo—native fast IIS 7 module to run Python/Django applications.
Great article about it: Running Django on Windows.
- [Django]-Django error: got multiple values for keyword argument
- [Django]-Django – Render the <label> of a single form field
- [Django]-CORS error while consuming calling REST API with React
2đź‘Ť
There is another (faster) alternative for direct integration with IIS via WSGI: PyISAPIe.
isapi-wsgi is based from the relatively outdated ISAPI module included with Python and doesn’t mesh well with the design of IIS6/7. FastCGI is out-of-process and requires an IPC connection to IIS. Basic CGI means reloading Python for every request.
Also, PyISAPIe has a lower-level interface for those who prefer performance over compatibility.
- [Django]-How can I serialize a queryset from an unrelated model as a nested serializer?
- [Django]-Django switching, for a block of code, switch the language so translations are done in one language
- [Django]-What is "load url from future" in Django
1đź‘Ť
I was fishing around for some info on the same topic. I found a project on codeplex that Jeff Hardy had implemented the WSGI interface on .net – NWSGI. He also has some entries on his blogs on specifically running DJANGO and IronPython.
Blogs: http://jdhardy.blogspot.com/search/label/Django
NWSGI Project: http://nwsgi.codeplex.com/
- [Django]-How to get username from Django Rest Framework JWT token
- [Django]-Django – "Incorrect type. Expected pk value, received str" error
- [Django]-Unittest Django: Mock external API, what is proper way?
1đź‘Ť
I know this isn’t the answer you’re looking for, but hopefully it can help someone else!
I’ve posted a Django on Windows 2008 tutorial/howto on my blog which you may find helpful.
After a few hours of trying to get Django running on IIS7 using PyISAPIe, I gave up, since I was getting this (difficult to diagnose) error code when visiting the site’s URL:
PyISAPIe
0x8007007e
Apparently, this also happens with the PHP ISAP (which apparently indicates a missing DLL dependency), so it could be the same problem as I’m having with PyISAPIe. Also, when I tried to install using the installer, I got some error about a missing DLL so it sounds logical.
Anyway, suffice to say, it looks like Django+IIS isn’t that popular, so the support doesn’t appear to be excellent…
The server has an additional IP address, so now I’m just going to run Apache along side IIS7, since there are some .Net apps running on the server.
Side note: To run IIS7 and Apache at the same time, you’ll need to tell IIS7 to only bind to one IP address.
Update: Just got Django working on Windows Server 2008! It’s running on Apache along side an existing IIS7 install (which is bound to only one IP), and seems to work just fine… And, I’d recommend this route, rather than trying to get IIS7 to play nice with Django – trust me, you’ll have a better time of it.
- [Django]-Django can' t load Module 'debug_toolbar': No module named 'debug_toolbar'
- [Django]-ForeignKey to abstract class (generic relations)
- [Django]-Django composite unique on multiple model fields
0đź‘Ť
You should be able to use the FastCGI isapi developed by MS. It works on 6 but has better integration on 7. Disclaimer: I haven’t tried it with Django.
- [Django]-Github issues api 401, why? (django)
- [Django]-How can I access environment variables directly in a Django template?
- [Django]-Django.contrib.auth.logout in Django
0đź‘Ť
“official” support is usually not provided for anything but products and languages created by Microsoft.
- [Django]-What is the purpose of adding to INSTALLED_APPS in Django?
- [Django]-Django py.test does not find settings module
- [Django]-Django content-type : how do I get an object?
0đź‘Ť
As for the “official” bit… Since Django 1.0 (and newer) are all-WSGI compliant, it will not surprise me if the WSGI at some time will become the only “official” deployment method. Since mod_python is deprecated (and not developed anymore) and FastCGI is really served by FCGI-to-WSGI gateway, this seems reasonable prediction.
- [Django]-Cannot set Django to work with smtp.gmail.com
- [Django]-The QuerySet value for an exact lookup must be limited to one result using slicing. Filter error
- [Django]-How to monkey patch Django?