5e963e2ebbf5924affe44a392e3fb77e3f368c0c
[zzz-floof.git] / floof / model / __init__.py
1 #
2 # floof/floof/model/__init__.py
3 #
4 # Copyright (c) 2009 Scribblr
5 #
6 # See: http://bel-epa.com/docs/elixir_pylons/
7 #
8
9 """The application's model objects"""
10
11 from floof.model import art, users
12 from floof.model import meta
13 import elixir
14
15 elixir.options_defaults.update({ 'autoload': True, 'shortnames': True })
16
17 metadata = elixir.metadata
18
19 def init_model(engine):
20 elixir.session.configure(bind=engine)
21 metadata.bind = engine
22
23 if elixir.options_defaults.get('autoload', False):
24 if not metadata.is_bound():
25 elixir.delay_setup = True
26 else:
27 elixir.setup_all(True)
28