django-admin-autocomplete-list-filter icon indicating copy to clipboard operation
django-admin-autocomplete-list-filter copied to clipboard

Add support for autocomplete_fields that span foreign key relationships

Open chrisrodz opened this issue 5 years ago • 9 comments

Currently this list filter fails to account for fields that span across foreignkey relationships, it will correctly parse the field as a ForeignKey but will attempt to find it on the Model that belongs to the current ModelAdmin, instead of traversing across models.

I can add a more concrete example if necessary.

chrisrodz avatar Dec 13 '19 19:12 chrisrodz

Hmm... I'll investigate that. Thanks for the heads up!

vigo avatar Dec 16 '19 06:12 vigo

hi again, i guess i need more details :)

vigo avatar Dec 17 '19 07:12 vigo

Say we have such model structure: InvoiceItem => Invoice => User

Would be great to allow InvoiceItemAdmin with autocomplete working for nested relations, e.g. by specifying autocomplete_list_filter = ['invoice__user']

iMakedonsky avatar Mar 09 '20 13:03 iMakedonsky

I'll work on it!

vigo avatar Aug 17 '21 07:08 vigo

At present it does not work with such two level structure. I also came across this problem. The error message will be 'InvoiceItem has no field user'

georgekpg avatar Feb 26 '22 15:02 georgekpg

Any update on this?

memegauste avatar May 08 '23 05:05 memegauste

Not working yet

firvida avatar Jan 10 '24 21:01 firvida

Any update on this?

Kabirov7 avatar May 14 '24 21:05 Kabirov7

this project is deprecated, enjoy -> https://github.com/vigo/django-admin-list-filter

vigo avatar May 20 '24 16:05 vigo