Open Nielssie opened 4 days ago
Sure! See the discussion here: https://github.com/PHACDataHub/django-htmx-autocomplete/discussions/58
This is a common issue with the library and we want to make it easier to use dynamic querysets in a "v2" of the library.
If it is just user dependent, you can use a middleware helper or library (https://github.com/AlexCLeduc/django-data-fetcher) to get the current request. Then in the get_items method, create your subset of schools based on the request.user. No need to create the subset in the View.
In the current code
get_items
comes from a (deprecated) static method.I want to populate the get_items with a subset (
self.schools
). The subset is created in the View and user dependent Any ideas?