Mercurial > kallithea
view pylons_app/websetup.py @ 452:f19d3ee89335
updated whoosh indexer to take path as second argument
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 03 Sep 2010 13:15:16 +0200 |
parents | 3ed2d46a2ca7 |
children | 7c978511c951 |
line wrap: on
line source
"""Setup the pylons_app application""" from os.path import dirname as dn, join as jn 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""" dbmanage = DbManage(log_sql=True) dbmanage.create_tables(override=True) dbmanage.config_prompt() dbmanage.admin_prompt() dbmanage.create_permissions() dbmanage.populate_default_permissions() load_environment(conf.global_conf, conf.local_conf, initial=True)