I read this post in the group: 
http://groups.google.com/group/web2py/browse_thread/thread/6201f9f56bdb16d6,
and I am facing a similar problem.

I have one web2py installation in which I have a base application
which contains all shared files i.e .js and .css files. Within this
application I also defined all database tables, so all .table files
are in the databases folder of this application. Furthermore this
web2py installation contains an init application and b2c, b2b, crm
applications. The db.py files of these applications are copies of the
db.py of the base application with all migrates set to False. From the
post mentioned above I understand I can make a function of the base
app's db.py, name it db_stuff.py and put it in the base application's
modules file:

/web2py/applications/base/modules/db_stuff.py

My first question is: how do I make a function of a db.py file, and
which parts of the db.py file should the function contain?


Then, I should write an import statement in each of the applications
db.py files:

local_import('db_stuff',app='base')

My second question is: what code do these db.py files contain apart
from the import statement?


Kind regards,

Annet.

Reply via email to