> > *question:* > 1. why the error is occured while accessing the* parse_as_rest()* > function? i know the solution is uncomment the import and initiate a > service object >
The @service decorator is at the top level of the controller, so any time the controller is executed, that line will be executed (even though the function it decorates is not being called) -- so, the service object must be defined. > 2. let say comment the #@service.run or uncomment the import and initiate > a service object, when accessing the url : > http://127.0.0.1:8000/api/api/parse_as_rest/auth_event.json > > *result:* > *no matching pattern* > the same thing, while accessing auth_group, auth_user > As noted in the book, the 'auto' option excludes the "auth_" tables. > 5. interest in the syntax *validate_and_insert(**vars)*, what is the > logic behind that? plan to learn it and use with another micro framework, > e.g. slim or express to learn build an api server > See http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#validate_and_insert--validate_and_update. Anthony -- 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.

