From 95dcf56f4c28ce2f2f4ccf9943ee94c1c0145490 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Sun, 12 Apr 2009 02:25:18 +0000 Subject: [PATCH] [1.0.X] Fixed #9577 --Fixed URL display in the debug template. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch from Thomas Güttler. Backport of r10534 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10535 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/views/debug.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/django/views/debug.py b/django/views/debug.py index d1e9259243..4222baed69 100644 --- a/django/views/debug.py +++ b/django/views/debug.py @@ -99,7 +99,6 @@ class ExceptionReporter: 'frames': frames, 'lastframe': frames[-1], 'request': self.request, - 'request_protocol': self.request.is_secure() and "https" or "http", 'settings': get_safe_settings(), 'sys_executable': sys.executable, 'sys_version_info': '%d.%d.%d' % sys.version_info[0:3], @@ -258,7 +257,6 @@ def technical_404_response(request, exception): 'urlpatterns': tried, 'reason': smart_str(exception, errors='replace'), 'request': request, - 'request_protocol': request.is_secure() and "https" or "http", 'settings': get_safe_settings(), }) return HttpResponseNotFound(t.render(c), mimetype='text/html') @@ -397,7 +395,7 @@ TECHNICAL_500_TEMPLATE = """ Request URL: - {{ request_protocol }}://{{ request.META.HTTP_HOST }}{{ request.path_info|escape }} + {{ request.build_absolute_uri|escape }} Exception Type: @@ -527,7 +525,7 @@ TECHNICAL_500_TEMPLATE = """ Environment: 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 }} Python Version: {{ sys_version_info }} Installed Applications: @@ -717,7 +715,7 @@ TECHNICAL_404_TEMPLATE = """ Request URL: - {{ request_protocol }}://{{ request.META.HTTP_HOST }}{{ request.path_info|escape }} + {{ request.build_absolute_uri|escape }}