Thanks Denes, it worked.  Here is snippet from my app:

    location_data = 
json.loads(fetch('http://api.geonames.org/postalCodeLookupJSON?postalcode=%s&username=my_user_name'
 
% your_postal_code))
    there_is_data = False
    for x in location_data['postalcodes']:
        there_is_data=True
    if there_is_data == False:
        redirect(URL('go_to_one_function'))
    else:
        redirect(URL('go_to_a_different_function'))

Alex

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to