Commits

Mikhail Korobov committed 820f835

Non-English addresses can be handled now

  • Participants
  • Parent commits 01d5629

Comments (0)

Files changed (1)

easy_maps/models.py

     def fill_geocode_data(self):
         try:
             g = geocoders.Google(resource='maps')
-            self.computed_address, (self.latitude, self.longtitude,) = g.geocode(self.address)
+            address = self.address.encode('utf8')
+            self.computed_address, (self.latitude, self.longtitude,) = g.geocode(address)
             self.geocode_error = False
         except UnboundLocalError:
             self.geocode_error = True