Changes between Version 4 and Version 5 of BluePrintRESTImplementation
- Timestamp:
- 12/31/08 19:30:46 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BluePrintRESTImplementation
v4 v5 1 1 {{{ 2 2 # RESTful controller function 3 # Since some methods should require authentication, we must do so for all (unless we patch T2)4 @t2.requires_login('login')5 3 def feature(): 6 4 if request.args: … … 21 19 return dict(module_name=module_name,modules=modules,options=options,item=item) 22 20 elif method=="update": 23 form=t2.update(db.gis_feature) 24 response.view='gis/update_feature.html' 25 return dict(module_name=module_name,modules=modules,options=options,form=form) 21 if t2.logged_in: 22 form=t2.update(db.gis_feature) 23 response.view='gis/update_feature.html' 24 return dict(module_name=module_name,modules=modules,options=options,form=form) 25 else: 26 t2.redirect('login') 26 27 elif method=="delete": 27 28 t2.delete(db.gis_feature,next='features') … … 31 32 return 32 33 else: 33 # List Features (NB currently simple)34 # List Features 34 35 list=t2.itemize(db.gis_feature) 35 36 response.view='gis/list.html'