Hi Chris, You actually nailed it - after i split up my app, the question was reduced to "where do i define the Base class".
Thanks for your response and the mortar links. On May 20, 1:28 pm, Chris Withers <[email protected]> wrote: > 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 > addedhttp://packages.python.org/mortar_rdb/api.html#mortar_rdb.declarative... > to address exactly that problem, > seehttp://packages.python.org/mortar_rdb/use.htmlfora 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.
