Opened 11 years ago
Closed 11 years ago
#20664 closed Bug (fixed)
[py3] raw_id_fields popup does not return a pk
Reported by: | Jeff Triplett | Owned by: | Tim Graham |
---|---|---|---|
Component: | contrib.admin | Version: | 1.5 |
Severity: | Normal | Keywords: | raw_id_fields, admin |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The raw_id_fields popup appears to be broken in Django 1.5 (using Python 3). The popup lets you select a record but instead of returning the pk (to fill out the admin form), the popup window instead now goes to the change view and does not return back to the window that opened it. Same behavior in Chrome and Safari.
Attachments (1)
Change History (6)
comment:1 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Summary: | raw_id_fields popup is not returning a pk → [py3] raw_id_fields popup does not return a pk |
Triage Stage: | Unreviewed → Accepted |
by , 11 years ago
Attachment: | 20664.diff added |
---|
comment:2 by , 11 years ago
Has patch: | set |
---|
repr()
on Python 2 includes a leading u
on unicode strings which isn't there on Python 3. I think the repr()
call to add apostrophes around the pk in the attached patch can safely be replaced by HTML entities. This was originally added in [f2a45f9b].
comment:3 by , 11 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
LGTM.
Eventually, since the admin has the HTML5 doctype, you could replace the '
HTML entity by the more readable '
.
comment:5 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I can reproduce and am working on a patch.