On 25 Aug., 01:39, Russell Keith-Magee <russ...@keith-magee.com>
wrote:
> On principle, I have no objection to the idea of making the admin
> templates more robust in the presence of TEMPLATE_STRING_IF_INVALID;
> adding dummy values in the context sounds like a reasonable approach
> -- *if* doing this doesn't undermine broader error handling in the
> templates.

Yeah, sure. I don't think this is a big problem, a couple of places
tops. Thanks for considering this! I'm checking out the SVN release
right now, but actually the one that I've been bitten by so far has a
patch here (patch against current trunk below):

https://code.djangoproject.com/ticket/12136

Note that this was merged into a monster bug that had worse patches
(as far as I can tell), adding if-tags in the templates, and
depressingly never went anywhere.

Ole


Index: django/contrib/admin/templatetags/admin_list.py
===================================================================
--- django/contrib/admin/templatetags/admin_list.py     (revision 16696)
+++ django/contrib/admin/templatetags/admin_list.py     (working copy)
@@ -102,7 +102,10 @@
             admin_order_field = getattr(attr, "admin_order_field",
None)
             if not admin_order_field:
                 # Not sortable
-                yield {"text": text}
+                yield {
+                    "text": text,
+                    "class_attrib": ""
+                }
                 continue

         # OK, it is sortable if we got this far

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to