Open 1oglop1 opened 3 years ago
Hello @1oglop1, Did you manage to fix this error ?
redefine the class with admin register - it helped me. Example:
@admin.register(models.YOUMODEL) class YOUMODELAdmin(admin.ModelAdmin): list_display = ( "FILED", ) search_fields = ("FILED",)
And add this into u filter_list:
AutocompleteFilterFactory(
title="YOUR_TITLE",
base_parameter_name="ENTITYENTITYENTITY",
),
Hi, I'm new to Django so there are many things that are not obvious to me.
I extended example models like this:
And I'd like to be able to filter
by Publisher
onAlbumAdmin
page. How can I do that?I know how to display the
Publisher.name
but I cannot figure out how to use the filter.My hunch is that I need to use the custom view but whatever I tried from the examples finished with 2 errors: One mentioned in #60 and the second one
AttributeError: 'DeferredAttribute' object has no attribute 'queryset'
Thank you for your help!
EDIT 1 I found this project: https://github.com/thomst/django-more-admin-filters and they seem to be using
reverse_field_path
method which seem to be more intuitive.