websetup.py
25 lines
| 708 B
| text/x-python
|
PythonLexer
/ rhodecode / websetup.py
r547 | """Setup the rhodecode application""" | |||
from rhodecode.config.environment import load_environment | ||||
from rhodecode.lib.db_manage import DbManage | ||||
import logging | ||||
import os | ||||
log = logging.getLogger(__name__) | ||||
def setup_app(command, conf, vars): | ||||
"""Place any commands to setup rhodecode here""" | ||||
r781 | dbconf = conf['sqlalchemy.db1.url'] | |||
dbmanage = DbManage(log_sql=True, dbconf=dbconf, root=conf['here'], tests=False) | ||||
r547 | dbmanage.create_tables(override=True) | |||
r552 | dbmanage.config_prompt(None) | |||
r547 | dbmanage.create_default_user() | |||
dbmanage.admin_prompt() | ||||
dbmanage.create_permissions() | ||||
dbmanage.populate_default_permissions() | ||||
r781 | ||||
r555 | load_environment(conf.global_conf, conf.local_conf, initial=True) | |||
r547 | ||||
r552 | ||||