d0f03b307b1b13fca105d66633e4bf4e34aafc97
[zzz-floof.git] / floof / model / __init__.py
1 """The application's model objects"""
2 import sqlalchemy as sa
3 from sqlalchemy import orm
4
5 from floof.model import meta
6
7 # Tables are defined in separate files and imported to here
8 from floof.model.users import *
9 from floof.model.art import *
10
11 def init_model(engine):
12 """Call me before using any of the tables or classes in the model"""
13 ## Reflected tables must be defined and mapped here
14 #global reflected_table
15 #reflected_table = sa.Table("Reflected", meta.metadata, autoload=True,
16 # autoload_with=engine)
17 #orm.mapper(Reflected, reflected_table)
18 #
19 meta.Session.configure(bind=engine)
20 meta.engine = engine
21