Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix #841.

git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@1288 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 8a5327945fbdf33c2578c1392dda77a01941d119 1 parent 2256261
@rjwittams rjwittams authored
View
1  django/contrib/admin/templates/admin/template_debug.html
@@ -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
3  django/contrib/admin/views/main.py
@@ -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)
@@ -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,
View
1  django/core/template/defaultfilters.py
@@ -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
2  django/middleware/template_debug.py
@@ -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 = []
View
4 django/views/debug.py
@@ -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 @@ 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>
Please sign in to comment.
Something went wrong with that request. Please try again.