Skip to content

Medsien/django3-admin-select2

 
 

Repository files navigation

django3-admin-select2

Enable select2 for Django3 admin select inputs.

Automatically applies to all selects, excluding filtered selects (e.g. auth.User.groups).

Tested with Python 3.6 and Django 3.1.8.

Installation

pip install django3-admin-select2

Update settings.py:

INSTALLED_APPS = [
    ...
    # must go before django.contrib.admin
    'django3_admin_select2',
    ...
]

How it works

This app adds an overriding template for admin/base_site.html, adding the required css and js to extrahead and footer blocks respectively.

Note that Django admin's builtin Select2 only applies to ForeignKey and ManyToManyField.

Credits

This project was forked from mgd020/django-admin-select2.

About

Enable select2 for Django admin select inputs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 83.1%
  • HTML 16.9%