On Sat, Jun 25, 2011 at 7:19 AM, Grigoriy Tretyakov <
[email protected]> wrote:

> Hello.
>
> I'd like to use declarative_base from sqlalchemy.ext in my project. But for
> initialize Base, I need engine. How I can get initialized engine in
> model.__init__.py?
>
> May be I could use engine=None?
>

You do not need an engine to build a model using a declarative base. The
metadata/base only ever need an engine if you are using autoloading or when
you go to create the tables (Base.metadata.create_all(engine=..)).

-- 

Michael

-- 
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.

Reply via email to