Select2, autocomplete in the Django-Suit admin

Having auto-fill select widgets is a night and day improvement in UX for large select boxes.

Adding it to django suit was easy, but surprisingly not documented.

It has been easy to add Chosen or Select widgets via the popular django integration packages, but it failed to work on inlines.

To make that as easy as possible, I just decided to manually convert all select widgets on the screen into select2 widgets via a form include.

It was quite simple to hook into Suit’s add-inline event listener and remove the old select classes and adding new ones.

It should be a breeze to localize this if you are having it applied to random pieces.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s