On Fri, Nov 1, 2013 at 11:53 AM, António Ramos <[email protected]> wrote:

hello i dont get it about restfull
>
>
> I read the book and using the book example i should get my record with id
> 1 just by "Get"
>
>
> http://127.0.0.1:8000/angular/default/api/person/1
>
> however i get
>
> *no matching patterns*
>
> if i go to
>
> http://127.0.0.1:8000/angular/default/api/person/id/1<http://127.0.0.1:8000/angular/default/api/person/1>
>
> i get my record
>
> i have to add /id/ to the url, why?
>

Just define your patterns instead of patters = 'auto', something like this:

        patterns = (
            "/person[person]",
            "/person[person]/{person.id}",
        )

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

Reply via email to