I do not understand. :-(
On Jun 9, 3:21 am, Pawel Jasinski <[email protected]> wrote: > hi, > it is cosmetic, but can be a pain for someone no so familiar with > python. > In examples for restful api: > > def index(): > def GET(*args,**vars): > patterns = [ > "/persons[person]", > "/{person.name.startswith}", > "/{person.name}/:field", > "/{person.name}/pets[pet.person]", > "/{person.name}/pet[pet.person]/{pet.name}", > "/{person.name}/pet[pet.person]/{pet.name}/:field" > ] > parser = db.parse_as_rest(patterns,args,vars) > if parser.status == 200: > return dict(content=parser.response) > else: > raise HTTP(parser.status,parser.error) > def POST(table_name,**vars): > if table_name == 'person': > return db.person.validate_and_insert(**vars) > elif table_name == 'pet': > return db.pet.validate_and_insert(**vars) > else: > raise HTTP(400) > return locals() > > after copy paste everything is ok, but the problem is waiting to > happen ... > vars hides built-in vars function. > > cheers, > pawel

