django-geocoder
django-geocoder copied to clipboard
Use a registration approach for models
The current approach is to hook GeoMixin in any models you want to dynamically geocode, so we can extends models save().
This works in practice but can be risky and it's quite not convenient.
A better approach would be a models registration (eg. in apps.py) which calls geocode under the hood.
See https://github.com/algolia/algoliasearch-django/blob/master/src/registration.py for a working sample.