Ticket #11834: 11834_dimmed.patch
File 11834_dimmed.patch, 2.8 KB (added by , 13 years ago) |
---|
-
django/views/debug.py
231 231 function = tb.tb_frame.f_code.co_name 232 232 lineno = tb.tb_lineno - 1 233 233 loader = tb.tb_frame.f_globals.get('__loader__') 234 module_name = tb.tb_frame.f_globals.get('__name__') 234 module_name = tb.tb_frame.f_globals.get('__name__') or '' 235 235 pre_context_lineno, pre_context, context_line, post_context = self._get_lines_from_file(filename, lineno, 7, loader, module_name) 236 236 if pre_context_lineno is not None: 237 237 frames.append({ 238 238 'tb': tb, 239 'type': module_name.startswith('django.') and 'django' or 'user', 239 240 'filename': filename, 240 241 'function': function, 241 242 'lineno': lineno + 1, … … 332 333 table td.code pre { overflow:hidden; } 333 334 table.source th { color:#666; } 334 335 table.source td { font-family:monospace; white-space:pre; border-bottom:1px solid #eee; } 335 ul.traceback { list-style-type:none; } 336 ul.traceback li.frame { padding-bottom:1em; } 336 ul.traceback { list-style-type:none; color: #222; } 337 ul.traceback li.frame { padding-bottom:1em; color:#666; } 338 ul.traceback li.user { background-color:#e0e0e0; color:#000 } 337 339 div.context { padding:10px 0; overflow:hidden; } 338 340 div.context ol { padding-left:30px; margin:0 10px; list-style-position: inside; } 339 div.context ol li { font-family:monospace; white-space:pre; color:# 666; cursor:pointer; }341 div.context ol li { font-family:monospace; white-space:pre; color:#777; cursor:pointer; } 340 342 div.context ol li pre { display:inline; } 341 div.context ol.context-line li { color: black; background-color:#ccc; }343 div.context ol.context-line li { color:#505050; background-color:#dfdfdf; } 342 344 div.context ol.context-line li span { position:absolute; right:32px; } 345 .user div.context ol.context-line li { background-color:#bbb; color:#000; } 346 .user div.context ol li { color:#666; } 343 347 div.commands { margin-left: 40px; } 344 div.commands a { color:black; text-decoration:none; } 348 div.commands a { color:#555; text-decoration:none; } 349 .user div.commands a { color: black; } 345 350 #summary { background: #ffc; } 346 351 #summary h2 { font-weight: normal; color: #666; } 347 352 #explanation { background:#eee; } … … 520 525 <div id="browserTraceback"> 521 526 <ul class="traceback"> 522 527 {% for frame in frames %} 523 <li class="frame ">528 <li class="frame {{ frame.type }}"> 524 529 <code>{{ frame.filename|escape }}</code> in <code>{{ frame.function|escape }}</code> 525 530 526 531 {% if frame.context_line %}