django-select2
This is a Django_ integration of Select2_.
What it is and what it does
Django-Select2 wraps the Select2 JavaScript library to provide enhanced autocomplete and dropdown selection fields for Django forms. It replaces standard HTML select elements with searchable, filterable dropdowns that improve user experience when choosing from large or dynamic option lists. The package integrates directly into Django's form system, allowing developers to attach Select2 functionality to model choice fields with minimal configuration.
The package is lightweight, depending only on Django itself and django-appconf for configuration management. It supports current Python versions (3.10 through 3.14) and recent Django releases (4.2, 5.2, 6.0). The project is actively maintained with a stable, production-ready status, making it suitable for adding polished autocomplete behavior to existing Django applications without heavy dependencies.
Use it for:
- Add searchable dropdowns to admin forms for selecting related objects from large tables
- Implement typeahead search fields in user-facing forms to reduce selection friction
- Build multi-select fields with filtering for choosing multiple related items efficiently
- Replace standard select elements in data entry forms with autocomplete for better UX
- Create dynamic choice fields that filter options based on user input in real time
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides custom autocomplete form fields for Django that integrate Select2 for enhanced user selection experiences in web forms.
Yes. Django-Select2 is a stable, actively maintained package with low install friction and no known vulnerabilities. It solves a common UX problem in Django forms with a permissive license and broad Django version support. Install it when you need autocomplete or filtered selection fields beyond Django's built-in options.
Install
django-select2 on PyPI
pip
pip install django-select2uv
uv add django-select2poetry
poetry add django-select2Installing django-select2
Before you install
Low friction installation with only two runtime dependencies (django and django-appconf). Actively maintained with recent commits and stable production status across Django 4.2 through 6.0.
License in practice
MIT license permits use in both open-source and commercial projects with minimal restrictions.
Quickstart
pip install django-select2
from django_select2.forms import ModelSelect2Widget
from django import forms
class MyForm(forms.Form):
my_field = forms.ModelChoiceField(
queryset=MyModel.objects.all(),
widget=ModelSelect2Widget()
)
Requires Python 3.10 or later; Django 4.2, 5.2, or 6.0
Verify before relying
- Whether Select2 JavaScript library is bundled or requires separate frontend setup
- Performance characteristics with large datasets or high-cardinality selections
- Compatibility with Django's built-in autocomplete_fields feature mentioned in documentation
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — django, django-appconf |
| Maintenance | actively maintained — 219 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 526,172/month — #6,181 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_select2-8.4.8-py3-none-any.whl
Keywords: Django, select2, autocomplete, typeahead
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
django-admin-autocomplete-filterAdds autocomplete-based filtering to Django…
copyleft · top 15,000 on PyPI
django-autocomplete-lightProvides autocomplete widgets for Django forms…
permissive · top 15,000 on PyPI
django-formtoolsdjango-formtools provides high-level form…
permissive · top 5,000 on PyPI
django-tables2django-tables2 generates HTML tables from…
permissive · top 5,000 on PyPI
django-more-admin-filtersProvides a collection of Django admin filter…
permissive · top 15,000 on PyPI
django-json-widgetProvides a rich JSON editor widget for Django's…
permissive · top 5,000 on PyPI
django-recaptchaIntegrates Google reCAPTCHA (V2 Checkbox, V2…
permissive · top 15,000 on PyPI
django-admin-list-filter-dropdownRenders Django admin list filters as dropdown…
permissive · top 5,000 on PyPI
django-ckeditorIntegrates CKEditor 4.18.0 rich-text editing…
permissive · top 5,000 on PyPI
django-multiselectfieldAdds model and form fields to Django that let…
copyleft · top 5,000 on PyPI