Am working on GAE with python. How to construct and store the latitude and longitude using GeoPoint?
This is my DB
class Customer(db.Model):
name = db.StringProperty()
address= db.PostalAddressProperty()
geopoint= db.GeoPtProperty()
My code
class AddCustomerHandler(BaseHandler):
input_fullname=self.request.get('fullname')
input_cusaddress=self.request.get('cusaddress')
input_latitude=self.request.get('latitude')
input_longitude=self.request.get('longitude')
input_geopoint= GeoPoint(input_latitude, input_longitude)
logging.info('****************** xxxx= %s', input_geopoint)
newcustomer=Customer(name=input_fullname,address=input_cusaddress,geopoint=input_geopoint)
newcustomer.put()
Am trying this code. But Am getting error. How to store this geopoint field?