<NME> geocode.py
<BEF> from django.utils.encoding import smart_str

from geopy import geocoders

from geopy import geocoders
from geopy.exc import GeocoderServiceError


class Error(Exception):


def google_v3(address):
    """
    Given an address, return ``(computed_address, (latitude, longitude))``
    tuple using Google Geocoding API v3.


    """
    try:
        g = geocoders.GoogleV3()

        results = g.geocode(smart_str(address), exactly_one=False)
        if results is not None:

        raise Error("No results found for '%s'" % address)
    except (UnboundLocalError, ValueError, GeocoderServiceError) as e:
        raise Error(e)

<MSG> Merge pull request #70 from morris-tech/develop

geocode API key
<DFF> @@ -4,6 +4,7 @@ from django.utils.encoding import smart_str
 
 from geopy import geocoders
 from geopy.exc import GeocoderServiceError
+from .conf import settings
 
 
 class Error(Exception):
@@ -17,7 +18,7 @@ def google_v3(address):
 
     """
     try:
-        g = geocoders.GoogleV3()
+        g = geocoders.GoogleV3(api_key=settings.EASY_MAPS_GOOGLE_MAPS_API_KEY)
 
         results = g.geocode(smart_str(address), exactly_one=False)
         if results is not None:

Merge pull request #70 from morris-tech/develop