[Answer]-Django admin – select user objects per each row – low performances

1👍

Django InlineModelAdmin(Super class of TabularInline) has an option called raw_id_fields which, instead of fetching all the records and showing a dropdown, shows a simple text field with all the IDs of the selected items and a button to browse and de/select records. E.g.

class BookInline(admin.TabularInline):
    model = Book
    raw_id_fields = ("pages",)

and it looks like this –

raw_id_fields output

Leave a comment