Opened 5 years ago

Closed 5 years ago

#17872 closed Bug (duplicate)

Sometime i need a Custom Widget to overrides default Widget on Admin inlines.

Reported by: Kidwind Owned by: nobody
Component: contrib.admin Version: master
Severity: Normal Keywords: InlineModelAdmin
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes

Description

Sometime i need a Custom Widget to overrides default Widget on Admin inlines.

formfield_overrides = {

models.TextField: {'widget': MyCustomWidget},

}

and MyCustomWidget need some script to drive.
now the "add another" not work well.
so i provide the solution to the problem.

Attachments (1)

inlines.js.diff (1008 bytes) - added by Kidwind 5 years ago.

Download all attachments as: .zip

Change History (3)

Changed 5 years ago by Kidwind

Attachment: inlines.js.diff added

comment:1 Changed 5 years ago by Mark Lavin

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

At first glance this seems like an incomplete solution at best since it appears to only manipulate inline JS rendered in the row. There are related tickets #15693 and #15760 which propose an alternate solution.

comment:2 Changed 5 years ago by Karen Tracey

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top