Code

Opened 2 years ago

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

Download all attachments as: .zip

Change History (3)

Changed 2 years ago by Kidwind

comment:1 Changed 2 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 2 years ago by kmtracey

  • Resolution set to duplicate
  • Status changed from new to closed

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.