Hello,
I would like to update some field with the out put of a web2py query that I
can transform as dict like this :
db(...).select(db.table1.field1, db.table1.field2).first().as_dict()
Then I would do that :
db(...).update(db(...).select(db.table1.field1,
db.table1.field2).first().as_dict())
You have to unpack the dict
db.table.insert(**dict)
dbset.update(**dict)
In python ** unpack dict key/value
Also if you want to filter the valid fields you can use the
db.table.insert(**db.table._filter_fields(dict))
On Tue, Apr 3, 2012 at 12:26 PM, Richard wrote:
> Hello,
>
> I would like t
Ho!
Thanks...
Richard
On Tue, Apr 3, 2012 at 11:47 AM, Bruno Rocha wrote:
> You have to unpack the dict
>
> db.table.insert(**dict)
>
> dbset.update(**dict)
>
> In python ** unpack dict key/value
>
> Also if you want to filter the valid fields you can use the
>
> db.table.insert(**db.table._fi
3 matches
Mail list logo