Fixed #9577 --Fixed URL display in the debug template.
Patch from Thomas Güttler. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10534 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
77066516a0
commit
54800be3a1
|
@ -101,7 +101,6 @@ class ExceptionReporter:
|
||||||
'frames': frames,
|
'frames': frames,
|
||||||
'lastframe': frames[-1],
|
'lastframe': frames[-1],
|
||||||
'request': self.request,
|
'request': self.request,
|
||||||
'request_protocol': self.request.is_secure() and "https" or "http",
|
|
||||||
'settings': get_safe_settings(),
|
'settings': get_safe_settings(),
|
||||||
'sys_executable': sys.executable,
|
'sys_executable': sys.executable,
|
||||||
'sys_version_info': '%d.%d.%d' % sys.version_info[0:3],
|
'sys_version_info': '%d.%d.%d' % sys.version_info[0:3],
|
||||||
|
@ -260,7 +259,6 @@ def technical_404_response(request, exception):
|
||||||
'urlpatterns': tried,
|
'urlpatterns': tried,
|
||||||
'reason': smart_str(exception, errors='replace'),
|
'reason': smart_str(exception, errors='replace'),
|
||||||
'request': request,
|
'request': request,
|
||||||
'request_protocol': request.is_secure() and "https" or "http",
|
|
||||||
'settings': get_safe_settings(),
|
'settings': get_safe_settings(),
|
||||||
})
|
})
|
||||||
return HttpResponseNotFound(t.render(c), mimetype='text/html')
|
return HttpResponseNotFound(t.render(c), mimetype='text/html')
|
||||||
|
@ -399,7 +397,7 @@ TECHNICAL_500_TEMPLATE = """
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Request URL:</th>
|
<th>Request URL:</th>
|
||||||
<td>{{ request_protocol }}://{{ request.META.HTTP_HOST }}{{ request.path_info|escape }}</td>
|
<td>{{ request.build_absolute_uri|escape }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Exception Type:</th>
|
<th>Exception Type:</th>
|
||||||
|
@ -529,7 +527,7 @@ TECHNICAL_500_TEMPLATE = """
|
||||||
Environment:
|
Environment:
|
||||||
|
|
||||||
Request Method: {{ request.META.REQUEST_METHOD }}
|
Request Method: {{ request.META.REQUEST_METHOD }}
|
||||||
Request URL: {{ request_protocol }}://{{ request.META.HTTP_HOST }}{{ request.path_info|escape }}
|
Request URL: {{ request.build_absolute_uri|escape }}
|
||||||
Django Version: {{ django_version_info }}
|
Django Version: {{ django_version_info }}
|
||||||
Python Version: {{ sys_version_info }}
|
Python Version: {{ sys_version_info }}
|
||||||
Installed Applications:
|
Installed Applications:
|
||||||
|
@ -741,7 +739,7 @@ TECHNICAL_404_TEMPLATE = """
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Request URL:</th>
|
<th>Request URL:</th>
|
||||||
<td>{{ request_protocol }}://{{ request.META.HTTP_HOST }}{{ request.path_info|escape }}</td>
|
<td>{{ request.build_absolute_uri|escape }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue