1
0
Fork 0
gnuviechadminweb-historic/gnuviechadminweb/websetup.py

19 lines
589 B
Python

"""Setup the gnuviechadminweb application"""
import logging
from paste.deploy import appconfig
from pylons import config
from gnuviechadminweb.config.environment import load_environment
from gnuviechadminweb.model import meta
log = logging.getLogger(__name__)
def setup_config(command, filename, section, vars):
"""Place any commands to setup gnuviechadminweb here"""
conf = appconfig('config:' + filename)
load_environment(conf.global_conf, conf.local_conf)
log.info("Creating tables")
meta.metadata.create_all(bind=meta.engine)
log.info("Successfully setup")