Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # $URL: https://pyisapie.svn.sourceforge.net/svnroot/pyisapie/Tags/1.1.0-rc4/PyISAPIe/Python/Examples/WSGI/Isapi.py $
- # $Rev: 95 $ $Date: 2008-01-11 11:07:35 -0800 (Fri, 11 Jan 2008) $
- # (C)2008 Phillip Sitbon <[email protected]>
- #
- """Global ISAPI request handler for use with WSGI applications.
- This example merges two WSGI applications and also runs scripts
- directly.
- If you don't have either Django or Trac, comment out that section
- and the entry in "Apps" and it should work fine.
- You may also believe that you can run multiple Django projects just
- by choosing the DJANGO_SETTINGS_MODULE environment variable based
- on the URL, but beware- that is a process-level value you're
- changing! I'm not sure if the value is also looked for in the WSGI
- environment. For now, I'm just leaving it at one project.
- I chose to place the root folder under /app for the specific
- purpose of making PyISAPIe the wildcard handler for that path only.
- For IIS 5.x, all the paths must end in ".py" because an extension
- must be associated with a handler.
- See the install docs for further information, and the WSGI setup
- page for specifics about getting this script going.
- """
- from Http.WSGI import RunWSGI
- from Http import Env
- # from md5 import md5
- # import imp
- # import os
- from flask import Flask
- app = Flask(__name__)
- app.debug = True
- def Request():
- Name = Env.SCRIPT_NAME
- return RunWSGI(app(Name))
Advertisement
Add Comment
Please, Sign In to add comment