[Python-Chinese] How to Run Django in IIS (using pyisapie) and hope to help you.

Source: Internet
Author: User
Magic Lu Lujianxy is in gmail.com
Friday May 4 01:05:12 HKT 2007

Http://maowuu.com demonstration site needs to use the components pyisapie, python2.5, vs2005, pywin32, Django 0.96 everyone to download prepared first install python2.5 and pywin32 corresponding version, there is nothing to say here. Click Next as prompted. Then decompress pyisapie and enter source to use vs2005 (this is what I use, 2003 or 6 should be fine) to load python. lib and python. h to re-compile pyisapie. The downloaded pyisapie is compiled using python2.4 by default. Follow the instructions in http://code.djangoproject.com/wiki/djangoonwindowswithiisandsqlserver. When copying pyisapie. dll, use the one compiled by yourself. Finished? Don't worry, you still need to modify the file pyisapie. the first one in Py is to set response = This. GET_RESPONSE (Env. URL, request) to the following response = This. GET_RESPONSE (request) response. path = Env. the URL can be ignored. The response object in the DJ does not have the path attribute. There are no relevant requirements. Then, set # For chunk in http_response.iterator: # Write (chunk) write (http_response.content) OK. You can use it all. Hoho... Hope to help you. Among all the servers in the reminder, the IIS + pyisapie environment is set up above. I have not verified whether this problem exists in other environments. Small reminder (1): Django's URLs. all rules in Py start from accessing the root directory, that is, http: // localhost/. If you use a virtual directory (for example, the virtual directory is Python ), this virtual directory must be included in your rule. All settings in your URLs. py should start with r'python. Small reminder (2): In Django's devolopmentserver, the module loading path will be automatically searched by directory, but it will not be used in IIS. For example, when using Django-tagging, its fields. from tagging in The py module. validators importistaglist can be used in the built-in development server without any problems, but tagging is performed on the server. validators cannot be found. It must be projectname. tagging. validators only
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.