django-advanced-filters
django-advanced-filters copied to clipboard
Customize Results for GetFieldChoices view
Are there any best practices around how to further limit the results of the GetFieldName view? In my particular use case, all of the objects in my system belong to an "account" via foreign key, and I would like to limit the choices to include only those with the same "account" as the filterset being created. For reference, I am looking to implement something similar to the "forwarding" feature of Django Autocomplete Light.
https://django-autocomplete-light.readthedocs.io/en/master/tutorial.html?highlight=forwarded
The idea being that once the "account" is selected in the filterset, it would be forwarded to the GetFieldChoices view, and then used to further limit the choices returned.
I am messing around with trying to implement this myself, but just wanted to see if anybody could offer some guidance or best practices.