1
0
Форк 0
gnuviechadminweb-historic/gnuviechadminweb/model/__init__.py
Jan Dittberner 55124e861f * infrastructure for authkit
* menu generation code
* improved templates
* database and basic role setup in websetup.py
2008-06-05 16:24:43 +00:00

17 рядки
500 B
Python

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)
from gnuviechadminweb.model.user import Group, Role, User
from gnuviechadminweb.model.GVAUsers import GVAUsers
from gnuviechadminweb.model.menu import Menu