Ok, SQLITE does not allow it, so you can try a different approach.

Remove the unique and the notnull

*Field('unikey'', compute=lambda row: "%(user)d_%(location)s" % row)

add a validator.

db.site.unikey.requires = [IS_NOT_EMPTY(), IS_NOT_IN_DB(db, ' site.unikey')]
*

-- 



Reply via email to