db.define_table(
    'users',
    Field('name'),
    Field('email')
    )

db.users.name.represent = lambda name, row: A(name, _href=URL('default',
'download', args=name))



On Thu, May 31, 2012 at 8:22 PM, Saifuddin Rangwala <
[email protected]> wrote:

> Doesnt work. I tried doing this with the users table of examples
> application that comes with web2py also.
>
> Is there some setting to enable this? I do not get any error also.
>
> -Saif.
>
>
>
>
> On Thu, May 31, 2012 at 7:16 PM, villas <[email protected]> wrote:
>
>> Try this:
>>
>> db.Test.name.represent = lambda name, row: A(name, _href=URL('default',
>> 'download', args=name))
>>
>>
>>
>> On Thursday, 31 May 2012 13:34:01 UTC+1, Saifuddin Rangwala wrote:
>>>
>>> Hi,
>>>
>>> I am new to web2py.
>>>
>>> I have created a simple table like below:
>>>
>>> db.define_table('Test',
>>>     Field('name', 'string', required=True, unique=True),
>>>     Field('Description', 'text'),
>>> )
>>>
>>> db.Test..name.represent=lambda r, v: A(v, _href=URL('default',
>>> 'download', args=v))
>>>
>>> I am using SQLTABLE to render a select on this table and expecting to
>>> get the name as hyperlinks, but this is not working.
>>>
>>> Can someone please help what am I missing?
>>>
>>>
>>> -Saif.
>>>
>>
>
>
>

Reply via email to