Opened 9 years ago

Closed 9 years ago

#5407 closed (fixed)

raw_id ForeignKey field behaves like a ManyToManyField

Reported by: jkocherhans Owned by: xian
Component: contrib.admin Version: newforms-admin
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by jkocherhans)

Using the raw_id popup when the field is already populated results in each selected if being added with a comma. As a hint, this has to do with the field having a vRawIdAdminField class, which RelatedObjectLookup.js hooks on to. We should probably have 2 separate widgets, one for ForeignKey fields, and one for ManyToManyFields. Currently, they use the same raw_id widget.

Attachments (2)

many2manywidget.diff (4.2 KB) - added by xian 9 years ago.
many2manywidget.2.diff (4.3 KB) - added by xian 9 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 9 years ago by jkocherhans

Description: modified (diff)

comment:2 Changed 9 years ago by jkocherhans

Owner: changed from nobody to xian

comment:3 Changed 9 years ago by jkocherhans

Triage Stage: UnreviewedAccepted

Changed 9 years ago by xian

Attachment: many2manywidget.diff added

Changed 9 years ago by xian

Attachment: many2manywidget.2.diff added

comment:4 Changed 9 years ago by jkocherhans

Resolution: fixed
Status: newclosed

(In [6310]) newforms-admin: Fixed #5407. Javascript problems with raw_id fields. Thanks Christian Metts.

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