1. Nathan Duthoit
  2. django-easy-maps

Commits

Daniel Greenfeld  committed df0b489

Adding Google API key to help when you get blocked

  • Participants
  • Parent commits d2daaec
  • Branches default

Comments (0)

Files changed (1)

File easy_maps/models.py

View file
  • Ignore whitespace
             self.geocode_error = True
             return
         try:
-            if hasattr(settings, "EASY_MAPS_GOOGLE_KEY"):
+            if hasattr(settings, "EASY_MAPS_GOOGLE_KEY") and settings.EASY_MAPS_GOOGLE_KEY:
                 g = geocoders.Google(settings.EASY_MAPS_GOOGLE_KEY)
             else:
                 g = geocoders.Google(resource='maps')