demiroren-teknoloji / django-admin-autocomplete-list-filter

Ajax autocomplete list filter for Django admin
MIT License
83 stars 31 forks source link

Upstream django commit broke functionality #8

Closed guidolongoni closed 3 years ago

guidolongoni commented 3 years ago

Hi, I wanted to report that after this commit on django main repository the autocomplete list filter widget no longer works.

On first analysis, when instantiating the AjaxAutocompleteSelectWidget object, its __init__ function calls super().__init__ passing a "rel" keyword argument which is no longer accepted by django AutocompleteMixin init function, raising the following exception:

TypeError: __init__() got an unexpected keyword argument 'rel'

The offending change is in django/contrib/admin/widgets.py file at line 385.

I haven't delved into it yet, but judging from the commit message, it seems that fix #29138 ("Allowed autocomplete fields to target a custom to_field rather than the PK") is directly related to the choice of replacing the "rel" kwarg with the "field" kwarg, breaking the interface.

guidolongoni commented 3 years ago

Update: after the first fix attempt I ran into the issue #4, then I just found out that I was preceded and Guglielmo's pull request #6 solves that and this issue as well.

vigo commented 3 years ago

Fixed now! thanks