furious-luke / django-address

A Django address model and field. Addresses may be specified by address components or by performing an automatic Google Maps lookup.
BSD 3-Clause "New" or "Revised" License
431 stars 181 forks source link

Admin does not query google #158

Open Leikaab opened 2 years ago

Leikaab commented 2 years ago

Hi,

we are trying to use your address field to replace our current address model and add google functionality. Our app is a backend drf server When using the django admin to add addresses, we can not get any google functionality. Is this intended for forms only?

furious-luke commented 2 years ago

Hi @Leikaab! Thanks for reaching out. You can indeed use a Google address widget in the Django Admin. Please take a look in the example site admin file: example_site/person/admin.py. You'll need to update the admin definition for any model on which you're using an AddressField to use the AddressWidget. Hope that helps!

xjlin0 commented 2 years ago

Defining your GOOGLE_API_KEY in settings is also important.