##// END OF EJS Templates
merged with default
merged with default

File last commit:

r469:e94f4e54 default
r470:935dddee merge celery
Show More
websetup.py
47 lines | 1.4 KiB | text/x-python | PythonLexer
Marcin Kuzminski
initial commit.
r0 """Setup the pylons_app application"""
updated installation instruction, made more user friendly way of creating all needed configs. All is done now from paster setup-app
r327
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
implemented basic (startup) nose test suite.
r459 import datetime
from time import mktime
Marcin Kuzminski
initial commit.
r0 import logging
updated installation instruction, made more user friendly way of creating all needed configs. All is done now from paster setup-app
r327 import os
import sys
tests fix, put vcs testing tarball
r469 import tarfile
Marcin Kuzminski
initial commit.
r0 log = logging.getLogger(__name__)
updated installation instruction, made more user friendly way of creating all needed configs. All is done now from paster setup-app
r327 ROOT = dn(dn(os.path.realpath(__file__)))
sys.path.append(ROOT)
Marcin Kuzminski
initial commit.
r0 def setup_app(command, conf, vars):
"""Place any commands to setup pylons_app here"""
implemented basic (startup) nose test suite.
r459 log_sql = True
tests = False
dbname = os.path.split(conf['sqlalchemy.db1.url'])[-1]
filename = os.path.split(conf.filename)[-1]
if filename == 'tests.ini':
uniq_suffix = str(int(mktime(datetime.datetime.now().timetuple())))
REPO_TEST_PATH = '/tmp/hg_app_test_%s' % uniq_suffix
if not os.path.isdir(REPO_TEST_PATH):
os.mkdir(REPO_TEST_PATH)
tests fix, put vcs testing tarball
r469 cur_dir = dn(os.path.abspath(__file__))
tar = tarfile.open(jn(cur_dir,'tests',"vcs_test.tar.gz"))
tar.extractall(REPO_TEST_PATH)
tar.close()
implemented basic (startup) nose test suite.
r459
tests = True
dbmanage = DbManage(log_sql, dbname, tests)
updated installation instruction, made more user friendly way of creating all needed configs. All is done now from paster setup-app
r327 dbmanage.create_tables(override=True)
implemented basic (startup) nose test suite.
r459 dbmanage.config_prompt(REPO_TEST_PATH)
dbmanage.create_default_user()
updated installation instruction, made more user friendly way of creating all needed configs. All is done now from paster setup-app
r327 dbmanage.admin_prompt()
dbmanage.create_permissions()
permission refactoring,...
r417 dbmanage.populate_default_permissions()
Added initial query skipp when seting up the app....
r365 load_environment(conf.global_conf, conf.local_conf, initial=True)
updated installation instruction, made more user friendly way of creating all needed configs. All is done now from paster setup-app
r327