"""Setup the {{project}} application"""
import logging

from {{package}}.config.environment import load_environment
{{if sqlalchemy}}
from {{package}}.model import meta
{{endif}}

log = logging.getLogger(__name__)

def setup_app(command, conf, vars):
    """Place any commands to setup {{package}} here"""
    load_environment(conf.global_conf, conf.local_conf)
    {{if sqlalchemy}}

    # Create the tables if they don't already exist
    meta.metadata.create_all(bind=meta.engine)
    {{endif}}
