I am new to web2py and am having a problem understanding / finding an
answer to the following.
I have extended the Auth database in Web2py to include the following fields:
street
city
country
how would i read the street, city, country of the currently logged on user
and apply it look up a geocode.
So far i have the following code in controller but cant seem to find the
code to reference the database correctly.
def geo():
from gluon.tools import geocode
user= auth.user.id #gives me the user id
street = db.auth_user??????
city = ????
country = ????
(latitude, longitude) = geocode('street,city,country')
return dict(latitude=latitude,longitude=longitude)
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.