Author: mtredinnick
Date: 2009-04-11 21:25:18 -0500 (Sat, 11 Apr 2009)
New Revision: 10535

Modified:
   django/branches/releases/1.0.X/django/views/debug.py
Log:
[1.0.X] Fixed #9577 --Fixed URL display in the debug template.

Patch from Thomas G?\195?\188ttler.

Backport of r10534 from trunk.

Modified: django/branches/releases/1.0.X/django/views/debug.py
===================================================================
--- django/branches/releases/1.0.X/django/views/debug.py        2009-04-12 
02:23:19 UTC (rev 10534)
+++ django/branches/releases/1.0.X/django/views/debug.py        2009-04-12 
02:25:18 UTC (rev 10535)
@@ -99,7 +99,6 @@
             '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 @@
         '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 @@
     </tr>
     <tr>
       <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>
       <th>Exception Type:</th>
@@ -527,7 +525,7 @@
 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 @@
       </tr>
       <tr>
         <th>Request URL:</th>
-      <td>{{ request_protocol }}://{{ request.META.HTTP_HOST }}{{ 
request.path_info|escape }}</td>
+      <td>{{ request.build_absolute_uri|escape }}</td>
       </tr>
     </table>
   </div>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to