Skip to main content

Django application to handle chained model fields.

Project description

Django Smart Selects

Jazzband Build Status Coverage Status PyPI

This package allows you to quickly filter or group "chained" models by adding a custom foreign key or many to many field to your models. This will use an AJAX query to load only the applicable chained objects.

Works with Django version 2.2 to 4.0.

Warning: The AJAX endpoint enforces no permissions by default. This means that any model with a chained field will be world readable. If you would like more control over this permission, the django-autocomplete-light package is a great, high-quality package that enables the same functionality with permission checks.

Documentation

For more information on installation and configuration see the documentation at:

https://django-smart-selects.readthedocs.io/

Reporting issues / sending PRs

You can try the test_app example using:

python manage.py migrate
python manage.py loaddata test_app/fixtures/*
python manage.py runserver

Then login with admin/admin at http://127.0.0.1:8000/admin/

TODO

  • Add permission checks to enable users to restrict who can use the chained fields.
  • Add a ChainedCheckboxSelectMultiple widget and adjust chainedm2m.js and chainedfk.js to build checkboxes in that case

Project details


Download files

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

Source Distribution

django-smart-selects-1.6.0.tar.gz (263.3 kB view details)

Uploaded Source

Built Distribution

django_smart_selects-1.6.0-py3-none-any.whl (31.7 kB view details)

Uploaded Python 3

File details

Details for the file django-smart-selects-1.6.0.tar.gz.

File metadata

  • Download URL: django-smart-selects-1.6.0.tar.gz
  • Upload date:
  • Size: 263.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for django-smart-selects-1.6.0.tar.gz
Algorithm Hash digest
SHA256 67ce449bf456ddb6fc5434fa1a55f21194ef11a3b6871d7454f7f7c5a30bf493
MD5 67965f05146e2d2870414502587be202
BLAKE2b-256 61e1f19f48bd6ff9ef9d4355a22f302da40fb7520258bc3ab3aa75b511f96e1d

See more details on using hashes here.

File details

Details for the file django_smart_selects-1.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_smart_selects-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bd8320a9d0f0a5e1d264f5563a3a068d4499e51481ee68a7712fe53272d572b0
MD5 81ed661a57c24b512417053ce12a47ee
BLAKE2b-256 399b04636b3f66855aa2f410380e53dc957d33c70c23a23279bbc8c920d65d14

See more details on using hashes here.

Supported by

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