Hello Massimo,

Is there something wrong with that?

@auth.requires_login()
def select():
    db['test_activity']['sdate'].readable=False
    db.test_activity.sdate.readable=False
    db['test_activity'].sdate.readable=False
    db[request.args(0)].sdate.readable=False
    table=crud.select(db[request.args(0)],_class='sortable')
    return dict(table=table)

Anything in red not working.

If I do it with SQLTABLE :

    rows123=db().select(db[request.args(0)].ALL)
    table=SQLTABLE(rows123,_class='sortable')

db().select(db[request.args(0)].ALL)

The .ALL request all the fields so it seems normal that .readable=False not
working...

What the problem???

Richard

On Wed, Oct 20, 2010 at 2:25 PM, mdipierro <[email protected]> wrote:

> db.table.field.readable=False
>
> On Oct 20, 10:30 am, Richard Vézina <[email protected]>
> wrote:
> > Hello,
> >
> > I try to develop a generic function that could show a data grid and
> expose
> > differents fields depending of specific group of users. So I have a
> series
> > of table that are very similar. They contain fields that are not
> necessarily
> > usefull for all users so I do not want to show these fields.
> >
> > SQLTABLE let specify the fields we want in the output with "columns=",
> but
> > since all my tables are partly different in the fields I want to show
> that
> > they contain I would have to hardcode for every single table the fields I
> > want in "columns=".
> >
> > I hope I make my self clear.
> >
> > Is there a way to proceed by black listing fields that we don't want to
> > expose??
> >
> > Richard
>

Reply via email to