Jan Dittberner
554276ed23
git-svn-id: file:///var/www/wwwusers/usr01/svn/pyalchemybiz/trunk@5 389c73d4-bf09-4d3d-a15e-f94a37d0667a
23 lines
691 B
Python
23 lines
691 B
Python
"""Setup the pyalchemybiz application"""
|
|
import logging
|
|
|
|
from paste.deploy import appconfig
|
|
from pylons import config
|
|
|
|
from pyalchemybiz.config.environment import load_environment
|
|
|
|
log = logging.getLogger(__name__)
|
|
|
|
def setup_config(command, filename, section, vars):
|
|
"""Place any commands to setup pyalchemybiz here"""
|
|
conf = appconfig('config:' + filename)
|
|
load_environment(conf.global_conf, conf.local_conf)
|
|
|
|
# Populate the DB on 'paster setup-app'
|
|
import pyalchemybiz.model as model
|
|
|
|
log.info("Setting up database connectivity...")
|
|
log.info("Creating tables...")
|
|
model.meta.metadata.create_all(bind=model.meta.engine)
|
|
log.info("Successfully set up.")
|