##// END OF EJS Templates
made action logger more global, to be used in other places to log other actions....
made action logger more global, to be used in other places to log other actions. cleaned unused import in simpleHG, fixed little logging in hooks

File last commit:

r491:fefffd6f celery
r536:39203995 default
Show More
websetup.py
32 lines | 885 B | text/x-python | PythonLexer
"""Setup the pylons_app application"""
from os.path import dirname as dn
from pylons_app.config.environment import load_environment
from pylons_app.lib.db_manage import DbManage
import logging
import os
import sys
log = logging.getLogger(__name__)
ROOT = dn(dn(os.path.realpath(__file__)))
sys.path.append(ROOT)
def setup_app(command, conf, vars):
"""Place any commands to setup pylons_app here"""
log_sql = True
tests = False
REPO_TEST_PATH = None
dbname = os.path.split(conf['sqlalchemy.db1.url'])[-1]
dbmanage = DbManage(log_sql, dbname, tests)
dbmanage.create_tables(override=True)
dbmanage.config_prompt(REPO_TEST_PATH)
dbmanage.create_default_user()
dbmanage.admin_prompt()
dbmanage.create_permissions()
dbmanage.populate_default_permissions()
load_environment(conf.global_conf, conf.local_conf, initial=True)