Opened 7 years ago

Last modified 4 years ago

#11974 new New feature

Submit_row in admin doesn't follow the pattern of using admin/app_label/model/submit_line.html

Reported by: vbmendes Owned by: nobody
Component: contrib.admin Version:
Severity: Normal Keywords: django admin templates
Cc: vbmendes, jedie, Andy Baker, andy@…, jgbreezer@… Triage Stage: Accepted
Has patch: yes Needs documentation: yes
Needs tests: yes Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

The admin's submit_row template tag does not follow the pattern for searching for templates: admin/app_label/model/submit_line.html

And it would be nice if it supports since it will be easier to override this template.

I made a patch that add this support.

Attachments (1)

admin_modify.diff (2.7 KB) - added by vbmendes 7 years ago.
Patch for the submit_rows template tag. With this, it will follow the template naming pattern of the admin.

Download all attachments as: .zip

Change History (11)

Changed 7 years ago by vbmendes

Attachment: admin_modify.diff added

Patch for the submit_rows template tag. With this, it will follow the template naming pattern of the admin.

comment:1 Changed 7 years ago by vbmendes

Cc: vbmendes added; vbmendes@… removed
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

comment:2 Changed 7 years ago by Jannis Leidel

Triage Stage: UnreviewedDesign decision needed

comment:3 Changed 6 years ago by jedie

Cc: jedie added

comment:4 Changed 6 years ago by Jannis Leidel

Needs documentation: set
Needs tests: set
Triage Stage: Design decision neededAccepted

comment:5 Changed 6 years ago by Ramiro Morales

See also #13875.

comment:6 Changed 5 years ago by Andy Baker

Cc: Andy Baker added
Severity: Normal
Type: Uncategorized

comment:7 Changed 5 years ago by Jannis Leidel

Easy pickings: unset
Type: UncategorizedNew feature
Version: 1.1

comment:8 Changed 5 years ago by Andy Baker <andy@…>

Cc: andy@… added
Needs documentation: unset
Needs tests: unset
UI/UX: unset

I am fairly sure it doesn't need tests or docs on the grounds that:

  1. We haven't documented the template structure of many similar parts of the admin
  2. We don't have specific tests for the template structure of other parts of the admin.

comment:9 Changed 5 years ago by Jannis Leidel

Needs documentation: set
Needs tests: set
Patch needs improvement: set

In fact there are several tests for using custom templates (e.g. source:django/trunk/tests/regressiontests/admin_views/tests.py?rev=16498#L608), so this definitely needs to be tested and documented as part of the "Overriding admin templates" docs (https://docs.djangoproject.com/en/dev//ref/contrib/admin/#overriding-admin-templates).

comment:10 Changed 4 years ago by John G

Cc: jgbreezer@… added
Note: See TracTickets for help on using tickets.
Back to Top