On 19/05/2011 15:57, 371c wrote:
The idea is to:

* create a separate project (eg. models_app) to be installed into the
python env via "python setup install" - sort of like a shared library.

Use buildout or a virtual_env if you're not already.

* In p1, p2 and/or p3, import "models_app" to have access to the
shared models.

Sounds perfect.

I have no idea of what could be the dangers of doing this especially
in respect to sqla sessions, pyramid transactions etc..

If you end up with multiple model packages and you use SQLAlchemy's declarative extension, then you can end up with "where do I define my Base?" problems.

I added http://packages.python.org/mortar_rdb/api.html#mortar_rdb.declarative_base to address exactly that problem, see http://packages.python.org/mortar_rdb/use.html fora full example.

cheers,

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
           - http://www.simplistix.co.uk

--
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to