About Dependent Autocompletes
You can create one autocomplete field dependent on another one with django-autocomplete-light
pretty easy using the special forwarding feature:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
Then you would define your views that return autocompleted values as follows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
|
The JavaScript of django-autocomplete-light
connects the fields in the frontend, and moreover, it is smart enough to work with prefixed and inline forms.
Tips and Tricks Programming Development Django 3.2 Django 2.2 django-autocomplete-light
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django GDPR Cookie Consent app
For Django websites that use cookies.