skillfed

django-select2

This is a Django_ integration of Select2_.

django-select2 v8.4.8 526.2K downloads/30d#6,181 on PyPI208
Permissive license Active released

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-select2

uv

uv add django-select2

poetry

poetry add django-select2

Installing 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

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 4.2Framework :: Django :: 5.2Framework :: Django :: 6.0Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development

Tags

django autocomplete fieldsselect2 integration djangotypeahead search formsdjango form autocompleteselect2 widget djangoautocomplete dropdown djangodjango typeahead search
django-formsautocomplete-uiselect2

More Software Development packages

typing-extensions

Provides backported and experimental type hints…

permissive · top 100 on PyPI

numpy

NumPy provides an N-dimensional array object…

permissive · top 100 on PyPI

fastapi

FastAPI is a Python web framework for building…

permissive · top 100 on PyPI

annotated-doc

Provides a way to document function parameters,…

permissive · top 100 on PyPI

typer

Typer builds command-line applications from…

permissive · top 1,000 on PyPI

distlib

Distlib provides low-level packaging utilities…

permissive · top 1,000 on PyPI

django-admin-autocomplete-filter

Adds autocomplete-based filtering to Django…

copyleft · top 15,000 on PyPI

django-autocomplete-light

Provides autocomplete widgets for Django forms…

permissive · top 15,000 on PyPI

django-formtools

django-formtools provides high-level form…

permissive · top 5,000 on PyPI

django-tables2

django-tables2 generates HTML tables from…

permissive · top 5,000 on PyPI

django-more-admin-filters

Provides a collection of Django admin filter…

permissive · top 15,000 on PyPI

django-json-widget

Provides a rich JSON editor widget for Django's…

permissive · top 5,000 on PyPI

django-recaptcha

Integrates Google reCAPTCHA (V2 Checkbox, V2…

permissive · top 15,000 on PyPI

django-admin-list-filter-dropdown

Renders Django admin list filters as dropdown…

permissive · top 5,000 on PyPI

django-ckeditor

Integrates CKEditor 4.18.0 rich-text editing…

permissive · top 5,000 on PyPI

django-multiselectfield

Adds model and form fields to Django that let…

copyleft · top 5,000 on PyPI