On the select code there is a attr parameter...

    def select(
        self,
        table,
        query=None,
        fields=None,
        orderby=None,
        limitby=None,
        headers={},
        **attr
        ):
        request = self.environment.request
        if not (isinstance(table, self.db.Table) or table in
self.db.tables):
            raise HTTP(404)
        if not isinstance(table, self.db.Table):
            table = self.db[table]
        if not query:
            query = table.id > 0
        if not fields:
            fields = [table.ALL]
        rows = self.db(query).select(*fields, **dict(orderby=orderby,
            limitby=limitby))
        if not rows:
            return None # Nicer than an empty table.
        if not 'linkto' in attr:
            attr['linkto'] = self.url(args='read')
        if not 'upload' in attr:
            attr['upload'] = self.url('download')
        if request.extension != 'html':
            return rows.as_list()
        return SQLTABLE(rows, headers=headers, **attr)

How can I set it though GET variables?

Thanks in advance,

Tito

On Wed, Jul 29, 2009 at 5:29 PM, Tito Garrido <titogarr...@gmail.com> wrote:

> Thanks Fran for your quickly reply!
> Isn't there an easy way to edit this linkto or add a new column customizing
> the form variable?
>
> Something like you did on:
> def data():
>    form = crud()
>    if request.args(0) == 'select':
>        try:
>            form['_class'] = 'flexme'
>        except:
>            pass
>    return dict(form = form)
>
> Regards,
>
> Tito
>
>
> On Wed, Jul 29, 2009 at 5:00 PM, Fran <francisb...@googlemail.com> wrote:
>
>>
>> On Jul 29, 8:59 pm, Fran <francisb...@googlemail.com> wrote:
>> > I have to modify the linkto in my app.
>> > I extend the SQLTABLE() class for this & call my modified version by
>> > an extended Crud() class.
>> > You can see this here:
>> http://trac.sahanapy.org/browser/modules/sahana.py
>>
>> Posted too early ;)
>>
>> F
>> >>
>>
>
>
> --
>
> Linux User #387870
> .........____
> .... _/_õ|__|
> ..º[ .-.___.-._| . . . .
> .__( o)__( o).:_______
> Sent from Sao Paulo, SP, Brazil
>



-- 

Linux User #387870
.........____
.... _/_õ|__|
..º[ .-.___.-._| . . . .
.__( o)__( o).:_______
Sent from Campinas, SP, Brazil

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" 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