Skip to main content

Fresh autocompletes for Django

Project description

https://img.shields.io/pypi/dm/django-autocomplete-light.svg https://badge.fury.io/py/django-autocomplete-light.png https://codecov.io/github/yourlabs/django-autocomplete-light/coverage.svg?branch=master

Features

  • Python 3.11–3.14 and Django 4.2–6.0+ support

  • Django (multiple) choice support,

  • Django (multiple) model choice support,

  • Django generic foreign key support (through django-querysetsequence),

  • Multiple widget support: select2.js, easy to add more.

  • Creating choices that don’t exist in the autocomplete,

  • Offering choices that depend on other fields in the form, in an elegant and innovative way,

  • Dynamic widget creation (ie. inlines), supports YOUR custom scripts too,

  • Provides a test API for your awesome autocompletes, to support YOUR custom use cases too,

  • A documented automatically tested example for each use case in test_project.

Upgrade from 3.12.1 to 4.0.0

DAL 4.0.0 is a breaking release focused on modern supported runtimes and removing unmaintained integration packages.

Before upgrading, make sure your application runs on Python 3.11 or newer and Django 4.2 or newer. Then upgrade the package:

pip install -U "django-autocomplete-light<5"

If you use optional integrations, install the matching extra explicitly:

pip install -U "django-autocomplete-light[gfk]<5"     # GenericForeignKey support
pip install -U "django-autocomplete-light[tags]<5"    # django-taggit support
pip install -U "django-autocomplete-light[nested]<5"  # django-nested-admin support

Remove the following packages from INSTALLED_APPS and imports; they are no longer shipped in DAL 4.0.0:

  • dal_genericm2m

  • dal_genericm2m_queryset_sequence

  • dal_gm2m

  • dal_gm2m_queryset_sequence

  • dal_select2_tagging

  • dal_legacy_static

The genericm2m extra was removed. Generic foreign key support remains available through django-autocomplete-light[gfk] and dal_queryset_sequence. django-taggit support remains available through django-autocomplete-light[tags] and dal_select2_taggit.

If your deployment or packaging scripts build DAL from source, switch from setup.py entry points to the PEP 517 build backend:

python -m build

After upgrading, test forms that render existing Select2 values, multiple Select2 submissions, clearable placeholders, HTMX swaps, and any custom attrs=None widget construction. These areas changed between 3.12.1 and 4.0.0.

Resources

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_autocomplete_light-4.0.3.tar.gz (99.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_autocomplete_light-4.0.3-py3-none-any.whl (113.5 kB view details)

Uploaded Python 3

File details

Details for the file django_autocomplete_light-4.0.3.tar.gz.

File metadata

File hashes

Hashes for django_autocomplete_light-4.0.3.tar.gz
Algorithm Hash digest
SHA256 1b0dc31aee64cc084358129df60954c05ab7132657873eebc0612e3160307057
MD5 1d2b88cce2ac3ce4edac6500cf17791b
BLAKE2b-256 b35d0f1f1884cfa5665a20a89497c80fc10726f47d982905c8e36e9ef31cc7e6

See more details on using hashes here.

File details

Details for the file django_autocomplete_light-4.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for django_autocomplete_light-4.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e36a7c570f914cfd793568eea3eb2646da4b64f6d1cd3bea8878cc8b20a18f3f
MD5 16afbcf039aa3c8770eaf6a541331269
BLAKE2b-256 22fa299a37e7a4baf7bec9c002e4bd1f46cc6e5db8565d8f9883407d471cf2df

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page