On Nov 5, 2010, at 11:00 AM, villas wrote:
> 
> Does SQLTABLE  linkto work properly?
> 
> If I use:
> SQLTABLE(mytablerows,linkto=URL())
> 
> I get URLs  like this:   myapp/default/mytable/mytable/id
> 
> Note the duplication of "mytable".

I wonder if this is really a "duplication". As web2py interprets a URL, the 
first mytable is a function name, and the second (in this case) is a table 
name, right? They happen to have the same name here.

(That said, SQLTABLE's linkto logic is distinctly non-trivial; I'm not at all 
sure what's going on in several of the cases.)

> I have tried with URL('mytable')  and URL(f='mytable'),  but it's the
> same.
> 
> Of course I can work around the issue specifying:
>    db.mytable.id.represent = lambda id:
> A('edit:',id,_href=URL(args=(id)))
> 
> ...which gives the URL that I expect,  but that is not the question
> here...
> 
> --D


Reply via email to