timbutler committed e81eec6

Updated to use Google Client ID and Google Secret Key, as well as updating the Readme to reflect the changes

Comments (0)

Files changed (2)

 If working on localhost you can run into Google Maps API lockdown. If this happens
-then create a EASY_MAPS_GOOGLE_KEY in your file::
+then create a the following in your file::
-    EASY_MAPS_GOOGLE_KEY = "your-google-maps-api-key"
+    GOOGLE_API_CLIENT_ID = "your-google-api-client-id"
+    GOOGLE_API_SECRET_KEY = "your-google-api-secret-key"
+You can configure your API details at
 If you need a place where center the map when no address is inserted yet add the
 latitudine and longitude to the EASY_MAPS_CENTER variable in your


             self.geocode_error = True
-            if hasattr(settings, "EASY_MAPS_GOOGLE_KEY") and settings.EASY_MAPS_GOOGLE_KEY:
-                g = geocoders.GoogleV3(settings.EASY_MAPS_GOOGLE_KEY)
+            if hasattr(settings, "GOOGLE_API_CLIENT_ID") and hasattr(settings, "GOOGLE_API_SECRET_KEY"):
+                g = geocoders.GoogleV3(client_id=settings.GOOGLE_API_CLIENT_ID,
+                                       secret_key=settings.GOOGLE_API_SECRET_KEY)
                 g = geocoders.GoogleV3(resource='maps')
             address = smart_str(self.address)