2 # floof/floof/model/__init__.py
4 # Copyright (c) 2009 Scribblr
6 # See: http://bel-epa.com/docs/elixir_pylons/
9 """The application's model objects"""
11 from floof
.model
import art
, users
12 from floof
.model
import meta
15 elixir
.session
= meta
.Session
16 Session
= elixir
.session
17 elixir
.options_defaults
.update({ 'autoload': True, 'shortnames': True })
19 metadata
= elixir
.metadata
21 def init_model(engine
):
22 elixir
.session
.configure(bind
=engine
)
23 metadata
.bind
= engine
25 if elixir
.options_defaults
.get('autoload', False):
26 if not metadata
.is_bound():
27 elixir
.delay_setup
= True
29 elixir
.setup_all(True)