Re: [Django] #14810: Admin inline templates need blocks

2 views
Skip to first unread message

Django

unread,
Feb 2, 2023, 10:45:48 AM2/2/23
to django-...@googlegroups.com
#14810: Admin inline templates need blocks
-------------------------------------+-------------------------------------
Reporter: Simon Meers | Owner:
| abdulrahman
Type: New feature | Status: assigned
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: template, block, | Triage Stage: Accepted
inheritance |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by abdulrahman):

* owner: Simon Meers => abdulrahman
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/14810#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 29, 2023, 10:52:36 AM6/29/23
to django-...@googlegroups.com
#14810: Admin inline templates need blocks
-------------------------------------+-------------------------------------
Reporter: Simon Meers | Owner:
| abdulrahman
Type: New feature | Status: assigned
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: template, block, | Triage Stage: Accepted
inheritance |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by abdulrahman:

Old 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.

New 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 not
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.

--

--
Ticket URL: <https://code.djangoproject.com/ticket/14810#comment:7>

Django

unread,
Jun 29, 2023, 5:13:10 PM6/29/23
to django-...@googlegroups.com
#14810: Admin inline templates need blocks
-------------------------------------+-------------------------------------
Reporter: Simon Meers | Owner:
| abdulrahman
Type: New feature | Status: assigned
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: template, block, | Triage Stage: Accepted
inheritance |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by abdulrahman):

* has_patch: 0 => 1


Comment:

The pull request:
https://github.com/django/django/pull/17030

--
Ticket URL: <https://code.djangoproject.com/ticket/14810#comment:8>

Django

unread,
Jun 30, 2023, 12:02:07 AM6/30/23
to django-...@googlegroups.com
#14810: Admin inline templates need blocks
-------------------------------------+-------------------------------------
Reporter: Simon Meers | Owner:
| abdulrahman
Type: New feature | Status: assigned
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: template, block, | Triage Stage: Accepted
inheritance |
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 0 => 1
* needs_docs: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/14810#comment:9>

Django

unread,
Nov 20, 2023, 7:19:14 AM11/20/23
to django-...@googlegroups.com
#14810: Admin inline templates need blocks
-------------------------------------+-------------------------------------
Reporter: Simon Meers | Owner:
| abdulrahman
Type: New feature | Status: closed
Component: contrib.admin | Version: dev
Severity: Normal | Resolution: wontfix

Keywords: template, block, | Triage Stage:
inheritance | Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* status: assigned => closed
* needs_better_patch: 1 => 0
* needs_docs: 1 => 0
* has_patch: 1 => 0
* resolution: => wontfix
* stage: Accepted => Unreviewed


Comment:

Do to the lack of any replies [https://forum.djangoproject.com/t/adding-
blocks-to-the-stacked-tabular-inline-templates/21969 on the forum], only a
few replies in the ticket, and strong doubts as to whether this is really
useful, I'll close the ticket as "wontfix".

`title` can already be customized with
`verbose_name`/`verbose_name_plural` and using `field-elements`/`table-
body`/`table-headers` will force users to rewrite almost the entire
template, so they are not very useful either.

--
Ticket URL: <https://code.djangoproject.com/ticket/14810#comment:10>

Reply all
Reply to author
Forward
0 new messages