Opened 17 years ago

Closed 17 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: no UI/UX: no

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 17 years ago.
many2manywidget.2.diff (4.3 KB ) - added by xian 17 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by jkocherhans, 17 years ago

Description: modified (diff)

comment:2 by jkocherhans, 17 years ago

Owner: changed from nobody to xian

comment:3 by jkocherhans, 17 years ago

Triage Stage: UnreviewedAccepted

by xian, 17 years ago

Attachment: many2manywidget.diff added

by xian, 17 years ago

Attachment: many2manywidget.2.diff added

comment:4 by jkocherhans, 17 years ago

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