You can share the schema across different apps by serving and requesting it 
in json or yaml format:

Is there a way we could share these things (db.py models and modules across 
> applications?)
>
> Currently we share databases across applications. IT is a bit tedious to 
> copy schema definitions to many applications.
>

# sanitize set to False preserves the uri string
data = db.as_json(sanitize=False)

At the client side you can then restore it with

from gluon.serializers import loads_json
schema = loads_json(data)
db = DAL(schema)

The Table class also supports similar methods to export a subset of the 
table definitions

-- 

--- 
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