El martes, 30 de julio de 2013 18:19:15 UTC-3, D Dan escribiĆ³:
>
> Thanks Alan.
>
> Could you give an example how to share db.py and other function under 
> models/ folder (say menu.py) across applications?
>

If you will share models stored in modules, I suppose you can try something 
similar to what is shown in the web2pyslices recipe list.

(web2py/site-packages/mymodule.py)

# db is the specific database connection for each app.
def define_db_tables(db, args):
    db.define_table(...)
    ...

Then in db.py you can do something like

from mymodule import define_db_tables
define_db_tables(db, args)

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to