Django

Code

Ticket #8172 (closed: fixed)

Opened 4 months ago

Last modified 3 months ago

Decruftify contrib templates

Reported by: benspaulding Assigned to: adrian
Milestone: Component: Contrib apps
Version: SVN Keywords: templates
Cc: Triage Stage: Accepted
Has patch: 1 Needs documentation: 0
Needs tests: 1 Patch needs improvement: 0

Description

The 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

decruftify_admin_templates.diff (22.5 kB) - added by benspaulding on 08/08/08 16:13:21.
decruftify_contrib_templates.diff (39.4 kB) - added by benspaulding on 09/01/08 13:00:44.
Updated patch to work on r8802.

Change History

08/08/08 16:13:21 changed by benspaulding

  • attachment decruftify_admin_templates.diff added.

08/11/08 10:57:09 changed by benspaulding

  • needs_better_patch changed.
  • summary changed from Decruftify the admin templates to Decruftify contrib templates.
  • component changed from Admin interface to Contrib apps.
  • needs_tests set to 1.
  • needs_docs changed.

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 sitemaps XML templates is the correct thing to do.

08/12/08 12:15:30 changed by jacob

  • stage changed from Unreviewed to Accepted.

09/01/08 13:00:44 changed by benspaulding

  • attachment decruftify_contrib_templates.diff added.

Updated patch to work on r8802.

09/08/08 00:00:30 changed by adrian

  • owner changed from nobody to adrian.
  • status changed from new to assigned.

Looks like great stuff...will work on checking it in.

09/08/08 00:19:28 changed by adrian

  • status changed from assigned to closed.
  • resolution set to fixed.

(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


Add/Change #8172 (Decruftify contrib templates)




Change Properties
Action