[FEATURE] filter on unrelated model
Is your feature request related to a problem? Please describe:
I admit I am doing some unconventional stuff. But I have a Django admin app where I also have some visualzations. These visualzations put together data from multiple sources, and are not in the database itself. It would be nice if on these visualzation pages, I could refer to any one model and have an (ajax) autocompletefilter.
Describe the solution you'd like:
Something along the lines of:
class ExperimentFilter(UnrelatedFieldAjax):
model = Experiment
field = "name"
@admin.register(PlateInspectorViz)
class PlateInspectorAdmin(admin.ModelAdmin):
change_list_template = "dashboard/plot.html"
list_filter = [
ExperimentFilter
]
Maybe something like this is already possible? But I haven't been able to figure out how to do this.
The filter wouldn't have to actually filter anything, except have nice autocomplete function and change the URL depending on the choice.
Hi @Maarten-vd-Sande we can schedule a call and explain/show me what you really need? maybe this helps me to understand better? my email can be found in git commits of the repo. Shoot me an email, we'll schedule a call ok?
@vigo I've send you an email. Let me know if you didn't get anything 😄