Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Robert Wittams authored November 19, 2005
1  django/contrib/admin/templates/admin/template_debug.html
... ...
@@ -1,5 +1,6 @@
1 1
 {% extends "admin/base_site" %}
2 2
 {% load adminmedia %}
  3
+{% load i18n %}
3 4
 {% block extrahead%} <link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/template_errors.css" /> {%endblock%}
4 5
 {% block content %}
5 6
    <div>
3  django/contrib/admin/views/main.py
@@ -53,7 +53,6 @@ def index(request):
53 53
 class IncorrectLookupParameters(Exception):
54 54
     pass
55 55
 
56  
-
57 56
 class ChangeList(object):
58 57
     def __init__(self, request, app_label, module_name):
59 58
         self.get_modules_and_options(app_label, module_name, request)
@@ -152,7 +151,7 @@ def get_results(self, request):
152 151
             result_list = lookup_mod.get_list(**lookup_params)
153 152
         else:
154 153
             try:
155  
-                result_list = p.get_page(page_num)
  154
+                result_list = paginator.get_page(page_num)
156 155
             except InvalidPage:
157 156
                 result_list = []
158 157
         (self.result_count, self.full_result_count, self.result_list, 
1  django/core/template/defaultfilters.py
@@ -200,6 +200,7 @@ def dictsort(value, arg):
200 200
     Takes a list of dicts, returns that list sorted by the property given in
201 201
     the argument.
202 202
     """
  203
+    print "ds:", type(value)
203 204
     decorated = [(resolve_variable('var.' + arg, {'var' : item}), item) for item in value]
204 205
     decorated.sort()
205 206
     return [item[1] for item in decorated]
2  django/middleware/template_debug.py
@@ -18,8 +18,6 @@ def process_exception(self, request, exception):
18 18
             origin, (start, end) = exception.source
19 19
             template_source = origin.reload()
20 20
             
21  
-           
22  
-           
23 21
             line = 0
24 22
             upto = 0
25 23
             source_lines = []
4  django/views/debug.py
@@ -25,7 +25,7 @@ def technical_500_response(request, exc_type, exc_value, tb):
25 25
             'filename' : filename,
26 26
             'function' : function,
27 27
             'lineno' : lineno,
28  
-            'vars' : tb.tb_frame.f_locals,
  28
+            'vars' : tb.tb_frame.f_locals.items(),
29 29
             'id' : id(tb),
30 30
             'pre_context' : pre_context,
31 31
             'context_line' : context_line,
@@ -253,7 +253,7 @@ def _get_lines_from_file(filename, lineno, context_lines):
253 253
               </tr>
254 254
             </thead>
255 255
             <tbody>
256  
-              {% for var in frame.vars.items|dictsort:"0" %}
  256
+              {% for var in frame.vars|dictsort:"0" %}
257 257
                 <tr>
258 258
                   <td>{{ var.0 }}</td>
259 259
                   <td class="code"><div>{{ var.1|pprint|escape }}</div></td>

0 notes on commit 8a53279

Please sign in to comment.
Something went wrong with that request. Please try again.