just share, hope can help others
*e.g.*
*controllers/default.py*
def test():
table = db.test
if session.lat and session.lon:
table.lat.default = session.lat
table.lon.default = session.lon
#import gluon.contrib.simplejson
#import urllib
#import json
import requests
url =
'http://maps.googleapis
On Saturday, 12 November 2016 21:50:34 UTC+11, 黄祥 wrote:
>
> 'for the update to be automatic when changes are made to the 1st table'
> perhaps you can use after_update or before_update callback
> ref:
>
> http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#callbacks-on-re
i have a form that capture latitude and longitude, and from the latitude
and longitude value, i want to capture the address info too. check on the
stackoverflow it can achieved by access url :
http://maps.googleapis.com/maps/api/geocode/json?latlng=lat,lon&sensor=true
is it possible to get json d
great
thank you and next time i promise to read the docs ;)
António
2016-11-12 5:23 GMT+00:00 Massimo Di Pierro :
> You can use
>
> auth.settings.update(
> table_user_name='auth_user',
> table_group_name='auth_group',
> table_membership_name='auth_membership',
> t
'for the update to be automatic when changes are made to the 1st table'
perhaps you can use after_update or before_update callback
ref:
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#callbacks-on-record-insert--delete-and-update
best regards,
stifan
--
Resources:
-
Thanks Leanel, I'll try your approaches. Especially second approach looks
great!
Any idea why that kind of solution isn't part of standard web2py and
documented in web2py book?
lauantai 5. marraskuuta 2016 19.56.03 UTC+2 Leonel Câmara kirjoitti:
>
> https://groups.google.com/forum/#!topic/web2p
6 matches
Mail list logo