Admin search field for inlines in foreign key relationships

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Admin search field for inlines in foreign key relationships

Raphaël
Hi,

I have two models, say Boxes and Widgets, using a Foreign Key field on Widgets to link them to Boxes.

A couple years ago, when I first started this project, I used this StackOverflow post to create a multi-select input so an administrator could easily add Widgets to Boxes.

The Widgets, however, are synchronized from an external provider. Recently we suddenly got ~60,000 Widgets added to the database, which makes the ModelMultipleChoiceField unusable, but it would still be ideal to be able to quickly add Widgets from the Box edit page.

What's the recommended way to do this? I was hoping that in the years since, perhaps a "search" field, similar to the one provided with raw_id_fields would have been added to the Admin's "Inline" system (hit search, find the record, have it added to the inlines before saving), but I haven't come across anything in my searches. Is there anything like that on the horizon, or are there any other simple ways to get this done? Or should we stick to searching through the Widgets and changing their boxes individually?

Thanks!

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2e2a84e3-5dc3-4730-b155-5a3e1a7e7b3d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.