2008-06-03 23:31:37 +02:00
|
|
|
import sqlalchemy as sa
|
|
|
|
from sqlalchemy import orm
|
|
|
|
|
|
|
|
from gnuviechadminweb.model import meta
|
|
|
|
|
|
|
|
def init_model(engine):
|
|
|
|
"""Call me before using any of the tables or classes in the model."""
|
|
|
|
|
|
|
|
sm = orm.sessionmaker(autoflush=True, transactional=True, bind=engine)
|
|
|
|
|
|
|
|
meta.engine = engine
|
|
|
|
meta.Session = orm.scoped_session(sm)
|
|
|
|
|
2008-06-05 18:24:43 +02:00
|
|
|
from gnuviechadminweb.model.user import Group, Role, User
|
2008-06-05 20:25:08 +02:00
|
|
|
from gnuviechadminweb.model.GVAUsers import GVAUsers, sha512
|
2008-06-05 18:24:43 +02:00
|
|
|
from gnuviechadminweb.model.menu import Menu
|