farhan0581 / django-admin-autocomplete-filter

A simple Django app to render list filters in django admin using autocomplete widget.
GNU General Public License v3.0
351 stars 76 forks source link

Nothing happens after selection #61

Open flyalex opened 3 years ago

flyalex commented 3 years ago

Hi,

Thx for the app!

Just installed with Django 2.2.4

django-admin-autocomplete-filter==0.6.1

installed apps 'admin_auto_filters' – at the bottom, but tried above admin also.

class BrandAutocompleteFilter(AutocompleteFilter): title = 'Brand' field_name = 'brand'

On the ProductAdmin added: list_filter = [BrandAutocompleteFilter]

I can see a filter on the admin page and it shows correct Brand qr, but after selection, nothing happens.

Also, it has some styles issue.

Am I doing something wrong?

Thank you.

81932f5dca

farhan0581 commented 3 years ago

can you try using the latest version 0.7 ?

samibh commented 3 years ago

Version 0.7 introduces this change

- from django.db.models import ManyToOneRel
+ from django.db.models import ForeignObjectRel

ForeignObjectRel is only introduced in django 3.1, it's not in 3.0 nor 2.2. So version 0.7 doesn't work at all with these versions.

farhan0581 commented 3 years ago

please check the latest version if this fixed the issue