Opened 16 years ago
Closed 16 years ago
#8172 closed (fixed)
Decruftify contrib templates
Reported by: | Ben Spaulding | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | Contrib apps | Version: | dev |
Severity: | Keywords: | templates | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | yes | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The [source:django/trunk/django/contrib/admin/templates/ admin templates] need to have some cruft removed, including the escape
filter and overuse of if
statements. This patch does not affect the output of the admin templates. It just cleans them up a bit.
Attachments (2)
Change History (6)
by , 16 years ago
Attachment: | decruftify_admin_templates.diff added |
---|
comment:1 by , 16 years ago
Component: | Admin interface → Contrib apps |
---|---|
Needs tests: | set |
Summary: | Decruftify the admin templates → Decruftify contrib templates |
comment:2 by , 16 years ago
Triage Stage: | Unreviewed → Accepted |
---|
by , 16 years ago
Attachment: | decruftify_contrib_templates.diff added |
---|
Updated patch to work on r8802.
comment:3 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Looks like great stuff...will work on checking it in.
comment:4 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [8984]) Fixed #8172 -- Improved a whole bunch of contrib templates (admin, databrowse, admindocs, etc.) to remove unnecessary 'escape' filters, given autoescaping. Also removed unnecessary {% if %} tags and shortened some {% if %}/{% else %} tags to use {% firstof %}. Thanks for the patch, benspaulding
Changeset [8264] moved the admin_doc templates, which meant the patch needed updated. Upon doing that I decided to look at the rest of the contrib app templates.
Again, this is nothing big. I am just trying to help out, get rid of cruft, and make things more readable.
I set needs_tests to true because I just want someone to verify that pulling the
{% autoescape off %
} template tag out of the [source:django/trunk/django/contrib/sitemaps/templates sitemaps XML templates] is the correct thing to do.