OK, so I tried your suggestion but it's not working for me. Here's my
case:
# model
db.define_table('test',SQLField('name','string'))
# controller
db.test.name.represent=lambda value: A(db.test.name,_href=URL
(r=request,f='index',args=db.test.name)
tests=SQLTABLE( db().select(db.test.ALL) )
The result is that instead of the link with the name of the test
hypertexted and the URL ending with the test name, I get the string
'test.name' as every test. Do I need an eval of some type in there?
On Mar 9, 3:16 am, SergeyPo <[email protected]> wrote:
> For second question
> seehttp://groups.google.com/group/web2py/browse_thread/thread/a0c789ccca...
> for an idea...
>
> On Mar 9, 7:54 am, weheh <[email protected]> wrote:
>
>
>
> > I'm really loving SQLTABLE and how concisely one can display a DB and
> > sort columns. BUT ...
>
> > 1) I'm running into a problem where the sort doesn't seem to be
> > working properly. When I click on the column the first time, the
> > orderby clause works fine. When I click on the column a second time,
> > the reverse orderby (~orderby) kind-of sorts but doesn't get the order
> > correct either alphabetically or numerically. I don't know what gives.
> > Any thoughts?
>
> > 2) I would like to create a different linkto on a per cell or column
> > basis. However, from the behavior, it looks like the link only works
> > for the .id column of the table. Is there an easy way to change this
> > behavior?
>
> > For those trying to figure out how to use SQLTABLE, I strongly suggest
> > looking at the appadmin.py and appadmin.html files to try to
> > understand how to use this feature of web2py. The doc that I was able
> > to find was accurate but very skinny on details.- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---