cordery / django-countries-plus

Django model & fixture representing all top level country data from Geonames.org
MIT License
45 stars 23 forks source link

Missing "search_fields" in CountryAdmin #19

Closed DanyPM closed 2 years ago

DanyPM commented 2 years ago

Hey ! I just found this module and it's really useful !

I am trying to enable auto-complete on a Country foreignkey field in the CompanyAdmin class of my Company model.

autocomplete_fields = ['country']

However I get the following error:

CountryAdmin must define "search_fields", because it\'s referenced by CompanyAdmin.autocomplete_fields

I wonder if there is a workaround to have auto-complete enabled on a ForeignKeyField for easier selection of country. Otherwise, is it planned to eventually have a "search_fields" attribute in the CountryAdmin class ?

Thanks in advance,

cordery commented 2 years ago

Thanks! Fixed in version 2.1.0, published today.