Skip to content

Commit

Permalink
Fix #841.
Browse files Browse the repository at this point in the history
git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@1288 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
rjwittams committed Nov 19, 2005
1 parent 2256261 commit 8a53279
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions django/contrib/admin/templates/admin/template_debug.html
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
3 changes: 1 addition & 2 deletions django/contrib/admin/views/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def index(request):
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)
Expand Down Expand Up @@ -152,7 +151,7 @@ def get_results(self, request):
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,
Expand Down
1 change: 1 addition & 0 deletions django/core/template/defaultfilters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 0 additions & 2 deletions django/middleware/template_debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ def process_exception(self, request, exception):
origin, (start, end) = exception.source
template_source = origin.reload()



line = 0
upto = 0
source_lines = []
Expand Down
4 changes: 2 additions & 2 deletions django/views/debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -253,7 +253,7 @@ def _get_lines_from_file(filename, lineno, context_lines):
</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>
Expand Down

0 comments on commit 8a53279

Please sign in to comment.