Opened 8 years ago

Last modified 8 years ago

#26387 closed Bug

Related popup doesn’t open in a changelist when in raw_id_fields — at Initial Version

Reported by: Bertrand Bordage Owned by: nobody
Component: contrib.admin Version: 1.8
Severity: Release blocker 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

Suppose you have this admin class, where 'fk' is a ForeignKey field name:

@register(YourModel)
class YourModelAdmin(ModelAdmin):
    list_display = ['fk']
    list_editable = ['fk']
    raw_id_fields = ['fk']

When you open the changelist, everything is displayed normally, fk consists in a field and a magnifying glass. But no javascript 'click' event is bound to the glass, so the changelist of the related model opens directly in the main window, not in popup.

Of course, it prevents the users from filling the field, the only solutions being: to type the ID, or to open the change view, which may be disabled if you want users to only use the changelist…

Bug experienced on all Django 1.9 versions, and probably master.

Change History (0)

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