ohmg-dev / OldInsuranceMaps

A public space for georeferencing historical fire insurance maps.
https://oldinsurancemaps.net
GNU General Public License v3.0
17 stars 2 forks source link

[Task] Speed up admin pages with autocomplete for ForeignKey fields #208

Open mradamcox opened 3 weeks ago

mradamcox commented 3 weeks ago

Describe the task Now that there are possible tens of thousands of options in some of the ForeignKey fields, loading a standard page in the admin backend can be slow, due to the select widget that is used for those fields by default.

Completion criteria Switch all relevant admin models to use autocomplete fields

mradamcox commented 3 weeks ago

Actually, seems like the raw_id_fields attribute may produce an even more appropriate widget for the majority of these use cases, and it's super fast to load. Prefer using this over the autocomplete fields, unless there is a specific need for the other. image