Re: [sqlalchemy] Re: How to separate models into own modules?

2010-11-01 Thread Michael Bayer
On Nov 1, 2010, at 3:52 PM, Daniel Meier wrote: > Thanks Michael > > I must admit that I completely misunderstood the session. It was clear > to me that everything done until session.commit() is in a transaction, > but I somehow had no idea how to implement it and ended up creating > those micro

[sqlalchemy] Re: How to separate models into own modules?

2010-11-01 Thread Daniel Meier
Thanks Michael I must admit that I completely misunderstood the session. It was clear to me that everything done until session.commit() is in a transaction, but I somehow had no idea how to implement it and ended up creating those micro-sessions.. Still not sure where to put the business logic. D

Re: [sqlalchemy] Re: How to separate models into own modules?

2010-11-01 Thread Michael Bayer
On Nov 1, 2010, at 11:26 AM, Daniel Meier wrote: > Well thank you guys for your help. > > I found the way how Django (if you know it) separates the modules > great. But I can also live with a single module containing all models. > > I played some time with sqlalchemy now, and I created two clas

[sqlalchemy] Re: How to separate models into own modules?

2010-11-01 Thread Daniel Meier
Well thank you guys for your help. I found the way how Django (if you know it) separates the modules great. But I can also live with a single module containing all models. I played some time with sqlalchemy now, and I created two classes in my db.py file (see http://pastie.org/1264141). In the Us

[sqlalchemy] Re: How to separate models into own modules?

2010-10-31 Thread jgs9000
Hi Daniel I do it like this: http://pastie.org/1263024 not 100% what's up with yours, but my way works Jon On Nov 1, 6:08 am, Daniel Meier wrote: > Hi list > > I have tried the examples in the ORM tutorial and I'm wondering how I > can separate different models into own modules. > > L