Ticket #285: script_name_path_info.diff
File script_name_path_info.diff, 1.8 KB (added by , 17 years ago) |
---|
-
django/http/__init__.py
26 26 def __init__(self): 27 27 self.GET, self.POST, self.COOKIES, self.META, self.FILES = {}, {}, {}, {}, {} 28 28 self.path = '' 29 self.full_path = '' 29 30 self.method = None 30 31 31 32 def __repr__(self): -
django/core/handlers/wsgi.py
75 75 class WSGIRequest(http.HttpRequest): 76 76 def __init__(self, environ): 77 77 self.environ = environ 78 self.path = force_unicode(environ['PATH_INFO']) 78 self.path = force_unicode(environ.get('PATH_INFO', '/')) 79 self.full_path = (force_unicode(environ.get('SCRIPT_NAME', '')) 80 + force_unicode(environ.get('PATH_INFO', '/'))) 79 81 self.META = environ 80 82 self.method = environ['REQUEST_METHOD'].upper() 81 83 -
django/core/handlers/modpython.py
14 14 class ModPythonRequest(http.HttpRequest): 15 15 def __init__(self, req): 16 16 self._req = req 17 self.path = force_unicode(req.uri) 17 self.full_path = force_unicode(req.uri) 18 root = req.options.get('django.root', '') 19 if root and req.uri.startswith(root): 20 self.path = force_unicode(req.uri[len(root):]) 21 else: 22 self.path = self.full_path 18 23 19 24 def __repr__(self): 20 25 # Since this is called as part of error handling, we need to be very