The @service.json and @service.xml exist but you do not need them. For
example if you have

def example():
    return dict(a=[1,2,3],b=['Hello','World'])

you can cal this with

    http://.../example
    http://.../example.html
    http://.../example.load (html but no layout)
    http://.../example.json (for json)
    http://.../example.xml (for xml)

No extra code required. Works for all actions. There is also a .rss
that works for some actions. You can define your own controller/
function.* views.

To change layout you can just install plugin layouts from 
http://web2py.com/layouts.
It will add a new menu button to change layout. Most layouts need a
little work.



On Jul 19, 10:13 pm, thedangler <matt...@gmail.com> wrote:
> Hello, I found a video once that showed how to do REST and returning a
> view as html or json or xml just by putting @json or @xml over the
> method.
>
> Also I was looking for the video where it shows you have to change the
> html by using a free html template taken from some template site.
>
> If anyone knows what videos these are can you please link me?
>
> Thank you

Reply via email to