I have a form with a ChoiceField in it. It is rendered to the user as a dropdown box.
Problem is, I have thousands of entries in this field, which is causing the page to (a) load very slowly and (b) be sluggish.
I want an alternative widget, instead of Select, that could handle more than 10,000 choices.
Something like the admin’s raw_id_fields would be good (if only it were usable in general forms…) but I’m open to ideas.
If autocomplete is an option for your UI you can take a look to django-simple-autocomplete:
EDITED (reply OP comment)
I have not tested this solution, but digging documentation and source it seems that not all data is loaded at a time:
Source code:
Widget source code