Code

Opened 5 years ago

Last modified 2 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, andybak, 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 5 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 5 years ago by vbmendes

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

comment:1 Changed 5 years ago by vbmendes

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

comment:2 Changed 5 years ago by jezdez

  • Triage Stage changed from Unreviewed to Design decision needed

comment:3 Changed 4 years ago by jedie

  • Cc jedie added

comment:4 Changed 4 years ago by jezdez

  • Needs documentation set
  • Needs tests set
  • Triage Stage changed from Design decision needed to Accepted

comment:5 Changed 4 years ago by ramiro

See also #13875.

comment:6 Changed 3 years ago by andybak

  • Cc andybak added
  • Severity set to Normal
  • Type set to Uncategorized

comment:7 Changed 3 years ago by jezdez

  • Easy pickings unset
  • Type changed from Uncategorized to New feature
  • Version 1.1 deleted

comment:8 Changed 3 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 3 years ago by jezdez

  • 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 2 years ago by jgbreezer

  • Cc jgbreezer@… added

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as new
The owner will be changed from nobody to anonymous. Next status will be 'assigned'
as The resolution will be set. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.