Ticket #8287: wrong-url-r8338.patch
File wrong-url-r8338.patch, 3.6 KB (added by , 16 years ago) |
---|
-
django/views/debug.py
254 254 t = Template(TECHNICAL_404_TEMPLATE, name='Technical 404 template') 255 255 c = Context({ 256 256 'root_urlconf': settings.ROOT_URLCONF, 257 'request_path': request.path [1:], # Trim leading slash257 'request_path': request.path_info[1:], # Trim leading slash 258 258 'urlpatterns': tried, 259 259 'reason': str(exception), 260 260 'request': request, … … 282 282 <head> 283 283 <meta http-equiv="content-type" content="text/html; charset=utf-8"> 284 284 <meta name="robots" content="NONE,NOARCHIVE"> 285 <title>{{ exception_type }} at {{ request.path |escape }}</title>285 <title>{{ exception_type }} at {{ request.path_info|escape }}</title> 286 286 <style type="text/css"> 287 287 html * { padding:0; margin:0; } 288 288 body * { padding:10px 20px; } … … 387 387 </head> 388 388 <body> 389 389 <div id="summary"> 390 <h1>{{ exception_type }} at {{ request.path |escape }}</h1>390 <h1>{{ exception_type }} at {{ request.path_info|escape }}</h1> 391 391 <h2>{{ exception_value|escape }}</h2> 392 392 <table class="meta"> 393 393 <tr> … … 396 396 </tr> 397 397 <tr> 398 398 <th>Request URL:</th> 399 <td>{{ request_protocol }}://{{ request.META.HTTP_HOST }}{{ request.path |escape }}</td>399 <td>{{ request_protocol }}://{{ request.META.HTTP_HOST }}{{ request.path_info|escape }}</td> 400 400 </tr> 401 401 <tr> 402 402 <th>Exception Type:</th> … … 519 519 <form action="http://dpaste.com/" name="pasteform" id="pasteform" method="post"> 520 520 <div id="pastebinTraceback" class="pastebin"> 521 521 <input type="hidden" name="language" value="PythonConsole"> 522 <input type="hidden" name="title" value="{{ exception_type|escape }} at {{ request.path |escape }}">522 <input type="hidden" name="title" value="{{ exception_type|escape }} at {{ request.path_info|escape }}"> 523 523 <input type="hidden" name="source" value="Django Dpaste Agent"> 524 524 <input type="hidden" name="poster" value="Django"> 525 525 <textarea name="content" id="traceback_area" cols="140" rows="25"> 526 526 Environment: 527 527 528 528 Request Method: {{ request.META.REQUEST_METHOD }} 529 Request URL: {{ request_protocol }}://{{ request.META.HTTP_HOST }}{{ request.path |escape }}529 Request URL: {{ request_protocol }}://{{ request.META.HTTP_HOST }}{{ request.path_info|escape }} 530 530 Django Version: {{ django_version_info }} 531 531 Python Version: {{ sys_version_info }} 532 532 Installed Applications: … … 553 553 {% for frame in frames %}File "{{ frame.filename|escape }}" in {{ frame.function|escape }} 554 554 {% if frame.context_line %} {{ frame.lineno }}. {{ frame.context_line|escape }}{% endif %} 555 555 {% endfor %} 556 Exception Type: {{ exception_type|escape }} at {{ request.path |escape }}556 Exception Type: {{ exception_type|escape }} at {{ request.path_info|escape }} 557 557 Exception Value: {{ exception_value|escape }} 558 558 </textarea> 559 559 <br><br> … … 686 686 <html lang="en"> 687 687 <head> 688 688 <meta http-equiv="content-type" content="text/html; charset=utf-8"> 689 <title>Page not found at {{ request.path |escape }}</title>689 <title>Page not found at {{ request.path_info|escape }}</title> 690 690 <meta name="robots" content="NONE,NOARCHIVE"> 691 691 <style type="text/css"> 692 692 html * { padding:0; margin:0; } … … 716 716 </tr> 717 717 <tr> 718 718 <th>Request URL:</th> 719 <td>{{ request_protocol }}://{{ request.META.HTTP_HOST }}{{ request.path |escape }}</td>719 <td>{{ request_protocol }}://{{ request.META.HTTP_HOST }}{{ request.path_info|escape }}</td> 720 720 </tr> 721 721 </table> 722 722 </div>