Ticket #9577: debug_request_url.diff

File debug_request_url.diff, 1.7 KB (added by Thomas Güttler, 16 years ago)
  • django/views/debug.py

     
    9999            'frames': frames,
    100100            'lastframe': frames[-1],
    101101            'request': self.request,
    102             'request_protocol': self.request.is_secure() and "https" or "http",
    103102            'settings': get_safe_settings(),
    104103            'sys_executable': sys.executable,
    105104            'sys_version_info': '%d.%d.%d' % sys.version_info[0:3],
     
    258257        'urlpatterns': tried,
    259258        'reason': smart_str(exception, errors='replace'),
    260259        'request': request,
    261         'request_protocol': request.is_secure() and "https" or "http",
    262260        'settings': get_safe_settings(),
    263261    })
    264262    return HttpResponseNotFound(t.render(c), mimetype='text/html')
     
    397395    </tr>
    398396    <tr>
    399397      <th>Request URL:</th>
    400       <td>{{ request_protocol }}://{{ request.META.HTTP_HOST }}{{ request.path_info|escape }}</td>
     398      <td>{{ request.build_absolute_uri|escape }}</td>
    401399    </tr>
    402400    <tr>
    403401      <th>Exception Type:</th>
     
    527525Environment:
    528526
    529527Request Method: {{ request.META.REQUEST_METHOD }}
    530 Request URL: {{ request_protocol }}://{{ request.META.HTTP_HOST }}{{ request.path_info|escape }}
     528Request URL: {{ request.build_absolute_uri|escape }}
    531529Django Version: {{ django_version_info }}
    532530Python Version: {{ sys_version_info }}
    533531Installed Applications:
     
    717715      </tr>
    718716      <tr>
    719717        <th>Request URL:</th>
    720       <td>{{ request_protocol }}://{{ request.META.HTTP_HOST }}{{ request.path_info|escape }}</td>
     718      <td>{{ request.build_absolute_uri|escape }}</td>
    721719      </tr>
    722720    </table>
    723721  </div>
Back to Top