Opened 5 years ago

Last modified 4 years ago

#14810 new New feature

Admin inline templates need blocks

Reported by: DrMeers Owned by: DrMeers
Component: contrib.admin Version: master
Severity: Normal Keywords: template, block, inheritance
Cc: julien, sehmaschine@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

This has been bugging me for years, but I've not spotted a matching ticket as yet. The admin/edit-inline/(stacked|tabular).html templates do no contain a single {% block %}, and are therefore quite useless when it comes to template inheritance. It is a common requirement to tweak a small fragment of these templates, but this cannot be done in a DRY manner at present.

I propose tidying up these templates and breaking them down into blocks to solve this. More than happy to write the code, just thought I'd raise it here first to make sure I hadn't missed anything.

Attachments (1)

stacked_example.diff (4.2 KB) - added by DrMeers 5 years ago.
Example stacked template with a few blocks (and indentation...?)

Download all attachments as: .zip

Change History (6)

comment:1 Changed 5 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

I'm fairly certain I've seen a similar ticket floating around before -- if not specifically about edit-inline, then about other aspects of the admin that could be made more modular.

Accepting on the basis that it's a good idea; if anyone knows or discovers the antecedent ticket, feel free to close this one.

Changed 5 years ago by DrMeers

Example stacked template with a few blocks (and indentation...?)

comment:2 Changed 5 years ago by anonymous

  • Cc sehmaschine@… added

comment:3 Changed 4 years ago by anonymous

  • milestone 1.3 deleted
  • Severity set to Normal
  • Type set to New feature

Calling it a new feature as it's providing new 'functionality' for admin template developers.

comment:4 Changed 4 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:5 Changed 4 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

Note: See TracTickets for help on using tickets.
Back to Top