Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#15693 closed Bug (duplicate)

Support broken for custom widgets in inlines Jquery based Add new <model type>

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

Description

If one of the fields in an inline has a custom widget which uses javascript, then the Add New <Model Name> jquery based JS function is unable to render the widget correctly even though the widget works and renders fine with existing inlines or with inlines which are created using the extra option in Admin

Change History (7)

comment:1 by Luke Plant, 14 years ago

Type: Bug

comment:2 by Luke Plant, 14 years ago

Severity: Normal

comment:3 by Julien Phalip, 14 years ago

Resolution: needsinfo
Status: newclosed

This report is a bit too vague. If you're experiencing an issue, please reopen and provide a more detailed use case, or even better some code we can test. Also, it'd be useful if you could track when (if) this actually got broken.

comment:4 by Brillgen Developers, 14 years ago

Easy pickings: unset
Resolution: needsinfo
Status: closedreopened

I'll work on extracting the code so that it can be presented here but I think the issue has been described pretty clearly to someone familiar with the Admin and/or its internals.

This got broken in Django 1.1/1.2 when the new functionality of adding inlines on-the-fly with javascript was introduced.

We have a custom widget we use to populate FK fields which works perfectly well with the Django Admin inlines when they have been created by the 'extra' parameter in the admin.
The widget does not work because its javascript event is not mapped to the new inline that has been created with javascript.

The bug is that the javascript add new inline functionality should support custom widgets as well...if it does, it's not obvious and not documented (AFAIK).

comment:5 by Karen Tracey, 14 years ago

Resolution: duplicate
Status: reopenedclosed

Please see approach/patch proposed in #15760 addresses this issue for you. For now I'm marking this as a dupe of that which more clearly describes the issue.

in reply to:  5 comment:6 by Karen Tracey, 14 years ago

Sorry "Please see IF THE appraoch/patch..." is what I meant to write above.

comment:7 by Brillgen Developers, 14 years ago

Yes, I had that figured...that ticket does delve into the issue better technically...and yes, that approach should work...I am trying it out over the weekend and will update that ticket..Thanks for your help.

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