"""The application's model objects"""
from sqlalchemy.orm import scoped_session, sessionmaker
import elixir

from {{package}}.model import meta

# make Session available for use and
# store for later access

Session = elixir.session = meta.Session
elixir.options_defaults.update({
    'shortnames': True
})

# use the elixir metadata
metadata = elixir.metadata

# this will be called in config/environment.py
def init_model(engine):
    elixir.session.configure(bind=engine) # Is this correct?
    metadata.bind = engine

## The shabti_auth template defines a user model. It is imported here.

from user import *

# The shabti_auth_rdfalchemy template defines a user model. It is imported here.

from rdfmodel import *

# import other entities here, e.g.

# from {{package}}.model.blog import *


# Finally, call elixir to set up the tables.

elixir.setup_all()


