RE: [sqlalchemy] Re: sqlalchemy.exc.NoReferencedTableError: Could not find table with which to generate a foreign key

2011-03-30 Thread King Simon-NFHD78
This is just the way Python works - code inside a module is only executed when that module is imported. If you don't import myapp.models.notes, then the class definitions never get executed. One solution is to import all the sub-modules in your bootstrap.py before calling create_all. Another is

RE: [sqlalchemy] Re: sqlalchemy.exc.NoReferencedTableError: Could not find table with which to generate a foreign key

2011-03-30 Thread King Simon-NFHD78
Something else must be importing those modules when run from pylons. If you really want to know how they are getting imported, stick something in the module which will raise an exception when it is imported (eg type blah blah blah at the top of the module) and look at the traceback. Cheers,