Opened 17 years ago

Closed 17 years ago

#4279 closed (duplicate)

Non-null TEMPLATE_STRING_IF_INVALID breaks admin UI

Reported by: Jeremy Dunck <jdunck@…> Owned by: Adrian Holovaty
Component: contrib.admin Version: dev
Severity: Keywords: admin template template_string_if_invalid
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The default admin templates include various lookups that are expected to fail under many conditions, but this only works nicely if TEMPLATE_STRING_IF_INVALID is the default ("").

For example, the contrib.admin.templatetags.results_headers yields dictionaries that often don't have class_attribs as a key, but the related template, admin/change_list_results.html, includes this code:

<th{{ header.class_attrib }}>

A non-null-string TEMPLATE_STRING_IF_INVALID causes the code to have an invalid tag type.

I'll hopefully soon file a patch, but wanted to report the issue in the meantime.

Change History (1)

comment:1 by Gary Wilson <gary.wilson@…>, 17 years ago

Resolution: duplicate
Status: newclosed

There was documentation added about this. There is also an open ticket that aims to remove the admin interface's reliance on an empty string TEMPLATE_STRING_IF_INVALID setting.

Note: See TracTickets for help on using tickets.
Back to Top