Version 1 (modified by 16 years ago) ( diff ) | ,
---|
Web Services
We want to be able to access data from the database exported as JSON for easy use within Javascript clients.
This is very easy within Web2Py since 1.55:
# Designed to be called via AJAX to be processed within JS client def display_feature_group_features_json(): list=db(db.gis_feature_group.id==t2.id).select(db.gis_feature_group.features).json() response.view='list_plain.html' return dict(list=list)
Note:
See TracWiki
for help on using the wiki.