Changes between Initial Version and Version 1 of Ticket #2384, comment 4
- Timestamp:
- Dec 20, 2012, 11:44:15 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #2384, comment 4
initial v1 3 3 We could use a non-default value in our admin tests to be sure these types of errors do not crop up again. 4 4 5 Is it worth fixing the admin? Yes. As far as I can tell, the admin is actually very close to being 100% free relying on invalid variables. Our original policy on `TEMPLATE_STRING_IF_INVALID` was put in place back in the old-admin days, but things are better now. As far as I've seen on live websites it's really just `header.class_attrib`. I have `USE_I18N = False` set, so the `LANGUAGE_CODE` variable is also invalid. On a live production website, those are the only two invalid variables I have run into.5 Is it worth fixing the admin? Yes. As far as I can tell, the admin is actually very close to being 100% free of relying on invalid variables. Our original policy on `TEMPLATE_STRING_IF_INVALID` was put in place back in the old-admin days, but things are better now. As far as I've seen on live websites it's really just this `header.class_attrib` problem. I have `USE_I18N = False` set, so the `LANGUAGE_CODE` variable is also invalid. On a live production website, those are the only two invalid variables I have run into. 6 6 7 7 It's easy to fix these errors, just wrap them in `{% if header.class_attrib %}`.