# auth.enable_record_versioning(db)
# add this to your app model file
from gluon.tools import PluginManager
plugins = PluginManager()
# clientapi options
# requests are logged by default. Here we disable them
plugins.clientapi.log = True
# setup makes the client api download any db scheme
# and set default values. You can call .setup from custom
# JavaScript code.
plugins.clientapi.setup = True
# a string function name for calling after client setup
# this is a convenient shortcut for handling database
# definitions upon retrieval. This can also be set with
# custom JavaScript.
plugins.clientapi.onsetup = None
# for other origin requests
plugins.clientapi.origin = "*"
Well, it is a problem with my code. I tried a simplified plugin setup following the old recipe (third edition) and it works.