On 9 February 2012 18:14, Bruno Rocha <rochacbr...@gmail.com> wrote: > I dont know exactly how it works, but I had problems serializing db in to > current, so Massimo said to always pass it explicitly to classes ad > functions, I remember that SQLITE worked, but not Postgres.
Anthony's advice to me earlier in this thread is working with PostgreSQL: In db.py: from gluon import current current.db = db and in the module: from gluon import * def regte_verwysing(regte, tabel, veld): db = current.db lys = db(db[tabel].article == regte).select(db[tabel][veld]) verwysings = [x[veld] for x in lys] return verwysings Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)