Ticket #2437: django_dpaste-2.diff
File django_dpaste-2.diff, 3.1 KB (added by , 17 years ago) |
---|
-
django/views/debug.py
131 131 if start is not None and end is not None: 132 132 unicode_str = exc_value.args[1] 133 133 unicode_hint = smart_unicode(unicode_str[max(start-5, 0):min(end+5, len(unicode_str))], 'ascii', errors='replace') 134 134 from django import get_version 135 135 t = Template(TECHNICAL_500_TEMPLATE, name='Technical 500 template') 136 136 c = Context({ 137 137 'exception_type': exc_type.__name__, … … 144 144 'settings': get_safe_settings(), 145 145 'sys_executable' : sys.executable, 146 146 'sys_version_info' : '%d.%d.%d' % sys.version_info[0:3], 147 'django_version_info' : get_version(), 147 148 'template_info': template_info, 148 149 'template_does_not_exist': template_does_not_exist, 149 150 'loader_debug_info': loader_debug_info, … … 329 330 toggle('browserTraceback', 'pastebinTraceback'); 330 331 return false; 331 332 } 333 function submitDPaste() { 334 document.pasteform.submit(); 335 } 332 336 //--> 333 337 </script> 334 338 </head> … … 409 413 </div> 410 414 {% endif %} 411 415 <div id="traceback"> 412 <h2>Traceback <span>(innermost last)</span></h2>416 <h2>Traceback</h2> 413 417 <div class="commands"><a href="#" onclick="return switchPastebinFriendly(this);">Switch to copy-and-paste view</a></div> 414 418 <br/> 415 419 {% autoescape off %} … … 462 466 <tr> 463 467 <td> 464 468 <code> 465 Traceback (most recent call last):<br/> 469 Environment:<br/> 470 Django Version: {{ django_version_info }}<br/> 471 Installed Applications: <br/> 472 {{ settings.INSTALLED_APPS|pprint|escape }} 473 Installed Middleware: <br/> 474 {{ settings.MIDDLEWARE_CLASSES|pprint|escape }} 475 <br/><br/> 476 Traceback:<br/> 466 477 {% for frame in frames %} 467 478 File "{{ frame.filename }}" in {{ frame.function }}<br/> 468 479 {% if frame.context_line %} … … 477 488 </table> 478 489 </div> 479 490 {% endautoescape %} 491 <a href="#" onclick="return submitDPaste();">Submit to DPaste</a><sup>?</sup><br/> 492 <form action="http://dpaste.com/" name="pasteform" id="pasteform" method="post"> 493 <input type="hidden" name="language" value="PythonConsole" /> 494 <input type="hidden" name="title" value="{{ exception_type|escape }} at {{ request.path|escape }}" /> 495 <input type="hidden" name="source" value="Django Dpaste Agent" /> 496 <input type="hidden" name="poster" value="Django" /> 497 <textarea name="content" id="traceback_area" cols="140" rows="30" style="display: none;"> 498 {% spaceless %} 499 Environment: 500 Django Version: {{ django_version_info }} 501 Python Version: {{ sys_version_info }} 502 Installed Applications: 503 {{ settings.INSTALLED_APPS|pprint }} 504 Installed Middleware: 505 {{ settings.MIDDLEWARE_CLASSES|pprint }} 506 507 Traceback: 508 {% for frame in frames %} 509 File "{{ frame.filename|escape }}" in {{ frame.function|escape }} 510 {% if frame.context_line %}{{ frame.lineno }}. {{ frame.context_line|escape }}{% endif %} 511 {% endfor %} 512 {{ exception_type|escape }} at {{ request.path|escape }} 513 {{ exception_value|escape }} 514 {% endspaceless %} 515 </textarea> 516 </form> 480 517 </div> 481 518 482 519 <div id="requestinfo">