On Tue, Oct 14, 2008 at 5:20 AM, Michael Bayer <[EMAIL PROTECTED]> wrote: > > > On Oct 13, 12:14 pm, "Tomasz Nazar" <[EMAIL PROTECTED]> wrote: >> 1) all model classes are defined in 1 file together with database mapping > > like everyone is saying, you can roll this however you want and > however is appropriate to the type of app you're building.
Michael and Mike - I've just found your "new" tutorial on how to use SQLA and how to setup classes in separate files! That's it! I wasn't looking into docs for a while :( http://wiki.pylonshq.com/display/pylonsdocs/Using+SQLAlchemy+with+Pylons It looks I can split my big file - I dreamed about that. That is great! One stuff that doesn't work for me is "autoload" a table definition. I almost copied your MyApp.tar.gz sources and adjusted to autoload. But doesn't work. --> sqlalchemy.exceptions.UnboundExecutionError: The MetaData is not bound to an Engine or Connection. Execution can not proceed without a database to execute against. Either execute with an explicit connection or assign the MetaData's .bind to enable implicit execution. I tried to move all mappings + t_tables to init_model (as engine is only available then), but still fail. Is it too much asking for similar source code, but with classes split into files and working with 'autoload'? Or point to a right way at least :) I can upload source when I'm done with it.. T. -- _i______'simplicity_is_the_key'__________tomasz_nazar _ii____'i_am_concern_oriented'________________JKM-UPR _iii__'patsystem.sf.net'___________________linux_user _'aspectized.com'___________________________prevayler --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
