#10171: Key class_attrib missing in result_headers dict used in
change_list_results
template
--------------------------------------------+-------------------------------
Reporter: [email protected] | Owner: nobody
Status: closed | Milestone:
Component: django.contrib.admin | Version: SVN
Resolution: invalid | Keywords:
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
--------------------------------------------+-------------------------------
Comment (by mtredinnick):
This isn't a bug. Templates are ''designed'' to be able to handle missing
attributes. If there are no attributes required for the "th" element, then
not supplying the `class_attrib` variable is quite valid. It will simply
be rendered as an empty string.
You are only seeing something different because you've set
`TEMPLATE_STRING_IF_INVALID` to something other than the empty string.
That is not designed for anything other than testing and debugging (that
is documented). There are lots of templates (Django's admin being one of
them) that rely on missing variables failing silently. It means we can
write templates in the way it's done now, rather than the much more
verbose version that you are proposing as the "fix".
So there's no bug here. When you run the site with
`TEMPLATE_STRING_IF_INVALID` set back to the empty string, it will work
perfectly.
--
Ticket URL: <http://code.djangoproject.com/ticket/10171#comment:3>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---