7caeed02bc9b6aab953949e81e0696cbb3ebcd3a
1 # -*- coding: utf-8 -*-
2 """Setup the floof application"""
5 from floof
.config
.environment
import load_environment
7 log
= logging
.getLogger(__name__
)
9 from pylons
import config
11 from floof
import model
as model
13 def setup_app(command
, conf
, vars):
14 """Place any commands to setup floof here"""
15 load_environment(conf
.global_conf
, conf
.local_conf
)
16 model
.metadata
.create_all()
18 # Initialisation here ... this sort of stuff:
21 identity_url
= IdentityURL(url
=u
'http://eevee.livejournal.com/')
22 user
= User(name
=u
'Eevee')
23 user
.identity_urls
.append(identity_url
)
26 # some_entity = model.Session.query(model.<modelfile>.<Some_Entity>).get(1)
27 # e.g. foo = model.Session.query(model.identity.User).get(1)
28 # from datetime import datetime
29 # some_entity.poked_on = datetime.now()
30 # model.Session.add(some_entity)
31 model
.Session
.commit()