Hi All: I've this situation: Based in a config file, the app must read /modify rows from some table, i.e. "tableA" BUT if in config file have setted an "test mode" must read/modify rows from another tables. i.e. "tableA_test" So, in db.py i read if is setted "test mode" or not, and then initalize db.tableA or db.tableA_test model.
That is not sooooo unconfortable to code. BUT the problem is with the rest of the app, I already made the code, for * db.tableA* object reference. And I dont want to re.write the code to attend the "test mode". I get a ticket with: Key Error: *tableA* when is set to use *tableA_test* So I'm asking if is possible to always code db.tableA even if declare db.define_table('*tableA_test*'....). Maybe something like: db['tableA'] = db.tableA_test and then the rest of the code, always reference: db.tableA.....etc Thanks in advance!