1
0
mirror of https://github.com/django/django.git synced 2025-07-04 17:59:13 +00:00
git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@1288 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Robert Wittams 2005-11-19 05:17:50 +00:00
parent 2256261ec5
commit 8a5327945f
5 changed files with 5 additions and 6 deletions

View File

@ -1,5 +1,6 @@
{% extends "admin/base_site" %}
{% load adminmedia %}
{% load i18n %}
{% block extrahead%} <link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/template_errors.css" /> {%endblock%}
{% block content %}
<div>

View File

@ -53,7 +53,6 @@ index = staff_member_required(index)
class IncorrectLookupParameters(Exception):
pass
class ChangeList(object):
def __init__(self, request, app_label, module_name):
self.get_modules_and_options(app_label, module_name, request)
@ -152,7 +151,7 @@ class ChangeList(object):
result_list = lookup_mod.get_list(**lookup_params)
else:
try:
result_list = p.get_page(page_num)
result_list = paginator.get_page(page_num)
except InvalidPage:
result_list = []
(self.result_count, self.full_result_count, self.result_list,

View File

@ -200,6 +200,7 @@ def dictsort(value, arg):
Takes a list of dicts, returns that list sorted by the property given in
the argument.
"""
print "ds:", type(value)
decorated = [(resolve_variable('var.' + arg, {'var' : item}), item) for item in value]
decorated.sort()
return [item[1] for item in decorated]

View File

@ -18,8 +18,6 @@ class TemplateDebugMiddleware(object):
origin, (start, end) = exception.source
template_source = origin.reload()
line = 0
upto = 0
source_lines = []

View File

@ -25,7 +25,7 @@ def technical_500_response(request, exc_type, exc_value, tb):
'filename' : filename,
'function' : function,
'lineno' : lineno,
'vars' : tb.tb_frame.f_locals,
'vars' : tb.tb_frame.f_locals.items(),
'id' : id(tb),
'pre_context' : pre_context,
'context_line' : context_line,
@ -253,7 +253,7 @@ TECHNICAL_500_TEMPLATE = """
</tr>
</thead>
<tbody>
{% for var in frame.vars.items|dictsort:"0" %}
{% for var in frame.vars|dictsort:"0" %}
<tr>
<td>{{ var.0 }}</td>
<td class="code"><div>{{ var.1|pprint|escape }}</div></td>