Hi,
Looking at that example:

def POST(table_name,**vars):
        return db[table_name].validate_and_insert(**vars)

I'm trying to do something like this:
@request.restful()
def api():
    clients = db(db.auth_user).select(db.auth.api_key)
    t = db.t_tests_results
    def POST(**post_params):
        for client in clients:
            if client.api_key == post_params.a:
                return t.validate_and_insert(t.f_test=post_params.b,
                                        t.f_platform=post_params.c, 
t.f_device=post_params.d,
                                        t.f_steps=post_params.e, 
t.f_matches=post_params.f,
                                        t.f_missmatches=post_params.g, 
t.f_missing=post_params.h)
            else:
                raise HTTP(400)

I am getting:

return db.t_tests_results.validate_and_insert(t.f_test=post_params.b,
SyntaxError: keyword can't be an expression


Thanks.






-- 
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/groups/opt_out.

Reply via email to