Opened 3 years ago

Closed 3 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 3 years ago.

Download all attachments as: .zip

Change History (3)

Changed 3 years ago by Kidwind

comment:1 Changed 3 years ago by mlavin

  • 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 3 years ago by kmtracey

  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.
Back to Top