fa97149858018613efce8e99daa55f2faadd96d3
[zzz-floof.git] / floof / websetup.py
1 """Setup the floof application"""
2 import elixir
3 import logging
4
5 from floof.config.environment import load_environment
6 from floof.model import meta
7 from floof.model.users import IdentityURL, User
8
9 log = logging.getLogger(__name__)
10
11 def setup_app(command, conf, vars):
12 """Place any commands to setup floof here"""
13 load_environment(conf.global_conf, conf.local_conf)
14
15 # Create the tables if they don't already exist
16 elixir.create_all(bind=meta.engine, checkfirst=False)
17
18 ### Load some basic data
19
20 # Users
21 identity_url = IdentityURL(url=u'http://eevee.livejournal.com/')
22 user = User(name=u'Eevee')
23 user.identity_urls.append(identity_url)
24
25 elixir.session.commit()