Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#27728 closed New feature (fixed)

Allowed overriding admin templatetag's templates.

Reported by: Raffaele Salmaso Owned by: Raffaele Salmaso
Component: contrib.admin Version: dev
Severity: Normal Keywords:
Cc: raffaele.salmaso+djangoproject@…, Collin Anderson Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Tim Graham)

Refs #11974, #12566, #18957, #19235, #26763

It would be really nice that could be possible to override some templatetag's templates using the "standard" admin patter of admin/app_label/model/template.html.

actions.html
change_list_results.html
date_hierarchy.html
pagination.html
search_form.html
submit_line.html

and the object_tools blocks which now are hardcoded in change_form.html and change_list.html

Change History (7)

comment:1 by Tim Graham, 7 years ago

Description: modified (diff)
Has patch: unset
Triage Stage: UnreviewedAccepted
Type: UncategorizedNew feature

It's probably okay. I would start small rather than updating all the tags at once.

comment:2 by Raffaele Salmaso, 7 years ago

Has patch: set
Owner: changed from nobody to Raffaele Salmaso
Status: newassigned
Summary: Allow overriding admin templatetag's templates.Allowed overriding admin templatetag's templates.
Version: 1.10master

Cleaned up PR => https://github.com/django/django/pull/7840

I made one commit for base templatetag and one commit for each converted templatetag.

comment:3 by Collin Anderson, 6 years ago

Cc: Collin Anderson added
Triage Stage: AcceptedReady for checkin

lgtm

comment:4 by Carlton Gibson <carlton.gibson@…>, 6 years ago

Resolution: fixed
Status: assignedclosed

In 5cc28dc7:

Fixed #27728 -- Allowed overriding admin templatetags templates.

comment:5 by Tim Graham <timograham@…>, 6 years ago

In 4c02e3cd:

Refs #27728 -- Made cosmetic edits to admin template tag template overriding.

comment:6 by Tim Graham <timograham@…>, 6 years ago

In 94a1804:

Refs #27728 -- Fixed thread safety of admin template tags.

Regression in 5cc28dc752c3ae78456bb835c3ba195489fc26d7.

comment:7 by Tim Graham <timograham@…>, 6 years ago

In 167d9852:

Refs #27728 -- Fixed BytesWarning in admin_views tests.

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