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