Opened 13 years ago
Closed 13 years ago
#16542 closed Bug (fixed)
Admin Raw ID widgets can show broken magnifying glass link
Reported by: | Ramiro Morales | Owned by: | Ramiro Morales |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
This can happen when the related model isn't registered with the same admin site.
Ideally these widgets should behave in a way consistent with the regular non-raw ID admin widgets in this regard.
Example:
# models.py from django.db import models class Honeycomb(models.Model): location = models.CharField(max_length=20) class Bee(models.Model): honeycomb = models.ForeignKey(Honeycomb)
# admin.py from django.contrib import admin import models class BeeAdmin(admin.ModelAdmin): raw_id_fields = ('honeycomb',) admin.site.register(models.Bee)
Try to add a Bee instance, in the add view click in the magnifying glass besides the 'Honeycomb' field, this leads to a 404 error.
Attachments (1)
Change History (7)
comment:1 by , 13 years ago
Description: | modified (diff) |
---|---|
Owner: | changed from | to
by , 13 years ago
Attachment: | 16542.2.diff added |
---|
comment:2 by , 13 years ago
Has patch: | set |
---|
comment:3 by , 13 years ago
Triage Stage: | Unreviewed → Accepted |
---|
follow-up: 5 comment:4 by , 13 years ago
comment:5 by , 13 years ago
Replying to anonymous:
I see no reason for
except NoReverseMatch: raiseAside from that it looks good I guess ;)
Point taken. Thanks
Note:
See TracTickets
for help on using tickets.
I see no reason for
Aside from that it looks good I guess ;)