Skip to content

Use the built-in Select2 autocomplete field for build parents in the admin view

Instead of displaying a select box with all the builds in the build admin view, use a Select2 which loads the related entries asynchronously on demand. This makes the page load near instantly and prevents this from happening:

image.png

I don't have a test env available at the moment, so this is UNTESTED and someone needs to make sure it does not blow up. It's a self-ref M2M and autocomplete_fields is a mature, built-in Django feature, so should be fine.

Merge request reports

Loading