Ok guys, I have solved it using:
def GET(*args, **vars):
patterns = 'auto'
parser = db.parse_as_rest(patterns, args, vars)
if parser.status == 200:
return dict(content=list(parser.response.render()))
else:
raise HTTP(parser.status, parser.error)
There is a better way to do it?
Greetings.
El 04/10/17 a las 13:26, Carlos Cesar Caballero Díaz escribió:
Hi, can I use the represent feature (or some alternative) for specify
how some specific data should be exposed in my parse_as_rest() rest api?
Let's say by example, that I have some field wich use uppercase, but
for some reason I need it at lowercase in the rest api.
Greetings.
--
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.