[sqlalchemy] Re: classes in separate files

2009-02-09 Thread Jiri Novak
Thank you both for the answers. Actually, I've just found a mistake in one of the files - there was a line: Base = declarative_base() :-/ It was left there from the previously "all-in-one" file version. Best regards c. 2009/2/9 MikeCo > > Here is an example of how we are doing it. > > http://

[sqlalchemy] Re: classes in separate files

2009-02-09 Thread MikeCo
Here is an example of how we are doing it. http://dpaste.com/hold/118525 separate the big paste into files as indicated by the comments and you should be able to run it. One key is that you need to import the user class into the address.py -- Mike --~--~-~--~~~---~-

[sqlalchemy] Re: classes in separate files

2009-02-09 Thread camlost
Yes, of course. This "feature" is provided by dbinit.py (mentioned at the bottom of the orig. message). c. On 9 Ún, 10:42, "King Simon-NFHD78" wrote: > Are all your classes using the same declarative_base? I think this is > necessary so that the tables use the same metadata and things like > fo

[sqlalchemy] Re: classes in separate files

2009-02-09 Thread King Simon-NFHD78
> -Original Message- > From: sqlalchemy@googlegroups.com > [mailto:sqlalch...@googlegroups.com] On Behalf Of camlost > Sent: 09 February 2009 09:18 > To: sqlalchemy > Subject: [sqlalchemy] classes in separate files > > > Hi, could someone advice me, please, how to split classes into > i