Still no comments about the issue below? I consider it an important
issues and am not sure this is best ways (although it is in trunk
now):

I have been working on this this morning and YES, there is a bug. But
there is more than that. The syntax I proposed before was

    http://.../app/controller/function/arg0/arg1/.../argN.extension

The problem is that works only if no args else there is ambiguity on
whether the extension belongs to the function or to the argN. This of

    http://..../admin/default/edit/filename.xml

Do we want the to edit "filename.xml" or to we want to serialize the
function edit in xml?

I tentatively made it work on trunk by changing the notation into

    http://.../app/controller/function.extension/arg0/arg1/.../argN

(it is backward compatible since the previous did not work if args
were present, moreover extension defaults always to html).

This is tentatively in the trunk and you can do (assuming a table
'xxx')

def select(): return dict(items=crud.select(request.args(0)))
# http://127.0.0.1:8000/app/default/select.html/xxx
# http://127.0.0.1:8000/app/default/select.xml/xxx

def read(): return dict(item=crud.read(request.args(0),request.args
(1)))
# http://127.0.0.1:8000/app/default/read.html/xxx/1
# http://127.0.0.1:8000/app/default/read.xml/xxx/1

def data(): return dict(data=crud())
# http://127.0.0.1:8000/app/default/data.html/select/xxx
# http://127.0.0.1:8000/app/default/data.xml/select/xxx
# http://127.0.0.1:8000/app/default/data.html/read/xxx/1
# http://127.0.0.1:8000/app/default/data.xml/read/xxx/1

Comments? Pros? Cons?

Massimo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to