| 8 | | # Designed to be called via AJAX to be processed within JS client |
| 9 | | def display_feature_group_features_json(): |
| 10 | | list=db(db.gis_feature_group.id==t2.id).select(db.gis_feature_group.features).json() |
| 11 | | response.view='list_plain.html' |
| 12 | | return dict(list=list) |
| | 9 | /sahana/module/resource?format=json # Lists all records of this resource |
| | 10 | /sahana/module/resource/id?format=json # List record with record.id==id |
| | 11 | /sahana/module/resource/create?format=json # ToDo |
| | 12 | /sahana/module/resource/update/id?format=json # ToDo |
| | 13 | }}} |
| | 14 | |
| | 15 | The underlying functions are very easy within Web2Py since 1.55: |
| | 16 | {{{ |
| | 17 | def display_json(): |
| | 18 | "Designed to be called via AJAX to be processed within JS client." |
| | 19 | list=db(db.table.id==t2.id).select(db.table.ALL).json() |
| | 20 | response.view='plain.html' |
| | 21 | return dict(item=list) |