X-Git-Url: http://git.veekun.com/zzz-floof.git/blobdiff_plain/e080215f07b8153ef01d6c840a4ba3a4bfc2d770..68a31d533aba7490c3f1f812075e8ab6eb9265d0:/floof/model/__init__.py diff --git a/floof/model/__init__.py b/floof/model/__init__.py index af26ba2..d0f03b3 100644 --- a/floof/model/__init__.py +++ b/floof/model/__init__.py @@ -4,6 +4,10 @@ from sqlalchemy import orm from floof.model import meta +# Tables are defined in separate files and imported to here +from floof.model.users import * +from floof.model.art import * + def init_model(engine): """Call me before using any of the tables or classes in the model""" ## Reflected tables must be defined and mapped here @@ -15,22 +19,3 @@ def init_model(engine): meta.Session.configure(bind=engine) meta.engine = engine - -## Non-reflected tables may be defined and mapped at module level -#foo_table = sa.Table("Foo", meta.metadata, -# sa.Column("id", sa.types.Integer, primary_key=True), -# sa.Column("bar", sa.types.String(255), nullable=False), -# ) -# -#class Foo(object): -# pass -# -#orm.mapper(Foo, foo_table) - - -## Classes for reflected tables may be defined here, but the table and -## mapping itself must be done in the init_model function -#reflected_table = None -# -#class Reflected(object): -# pass