Changes between Version 1 and Version 2 of Ticket #23173, comment 2
- Timestamp:
- Aug 9, 2014, 1:20:57 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #23173, comment 2
v1 v2 9 9 > Thanks. 10 10 11 In my evironment the PATH_INFO variable is not set. I don't get any error message, I just get wrong urls when calling django.core.urlresolvers.reverse or {% url %} template tag. Eg. I have a WSGI server at /foobar/ and the resolve function returns '/some/url/' instead of '/foobar/some/url/'. Easy to see, when SCRIPT_URL variable is set to '/foobar/' and PATH_INFO is not set, get_script_name(environ) will return ''while it should return '/foobar/'. Just look at the code, it's obvious: https://github.com/django/django/blob/master/django/core/handlers/wsgi.py#L229-L23711 In my evironment the PATH_INFO variable is not set. I don't get any error message, I just get wrong urls when calling django.core.urlresolvers.reverse or {% url %} template tag. Eg. I have a WSGI server at /foobar/ and the resolve function returns '/some/url/' instead of '/foobar/some/url/'. Easy to see, when SCRIPT_URL variable is set to '/foobar/' and PATH_INFO is not set, get_script_name(environ) will return an empty string while it should return '/foobar/'. Just look at the code, it's obvious: https://github.com/django/django/blob/master/django/core/handlers/wsgi.py#L229-L237