Greetings Web2Py fellows!
While working with the DAL and some views I faced wall when I looked at the
POST constructor from API. So the first question is simple.
Is there any way to only catch a value from the POST constructor and do
whatever I want inside the controller 'default.py' in order to keep using
some queries needed to verify information and insert the data into the
table with the appropiate values?
The second and last:
If the first one is doable, then what does an API method is supposed to
return?
Eg.
@request.restful()
def api():
def GET(*args,**vars):
return dict()
def POST(desired_value):
if (some_controller_method(desired_value)):
return something
else:
???
return something_else
def PUT(*args,**vars):
return dict()
def DELETE(*args,**vars):
return dict()
return locals()
That's all folks! Thank you very much for your time and attention. :D
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.