Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base: master
...
compare: master
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Showing with 12 additions and 1 deletion.
  1. +12 −1 django_wsgi.py
View
13 django_wsgi.py
@@ -60,8 +60,19 @@ class django_view(object):
def __init__(self, wsgi_app):
self.wsgi_app = wsgi_app
- def __call__(self, request):
+ def __call__(self, request, path=None):
environ = request.environ
+
+ script_name = environ.get('SCRIPT_NAME', u'')
+ if not path:
+ path = r'/'
+ script_name += environ['PATH_INFO']
+ else:
+ script_name += (environ['PATH_INFO'][:-len(path)])
+
+ environ['SCRIPT_NAME'] = script_name.rstrip('/')
+ environ['PATH_INFO'] = (path if path.startswith('/') else u'/' +
+ path)
results = {}
buffer = []
def start_response(status, response_headers, exc_info=None):

No commit comments for this range

Something went wrong with that request. Please try again.