annotate rhodecode/websetup.py @ 555:03676d39dd0a

added fault tolerant case when celeryconfig is not present in the directory. small form fixes, and websetup default app title and admin name
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 06 Oct 2010 18:26:59 +0200
parents 2642f128ad46
children 7ae66bddf48d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
547
1e757ac98988 renamed project to rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents: 491
diff changeset
1 """Setup the rhodecode application"""
1e757ac98988 renamed project to rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents: 491
diff changeset
2 from rhodecode.config.environment import load_environment
1e757ac98988 renamed project to rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents: 491
diff changeset
3 from rhodecode.lib.db_manage import DbManage
0
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
4 import logging
327
0e87466a117e updated installation instruction, made more user friendly way of creating all needed configs. All is done now from paster setup-app
Marcin Kuzminski <marcin@python-works.com>
parents: 0
diff changeset
5 import os
469
e94f4e54dc03 tests fix, put vcs testing tarball
Marcin Kuzminski <marcin@python-works.com>
parents: 459
diff changeset
6
0
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
7 log = logging.getLogger(__name__)
473
6b934c9607e7 Improved testing scenarios. Made test env creator
Marcin Kuzminski <marcin@python-works.com>
parents: 469
diff changeset
8
0
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
9 def setup_app(command, conf, vars):
547
1e757ac98988 renamed project to rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents: 491
diff changeset
10 """Place any commands to setup rhodecode here"""
491
fefffd6fd5f4 Added some more tests, rewrite testing schema, to autogenerate fresh db, new index.
Marcin Kuzminski <marcin@python-works.com>
parents: 473
diff changeset
11 dbname = os.path.split(conf['sqlalchemy.db1.url'])[-1]
552
2642f128ad46 removed egg info, update files for distutils build
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
12 dbmanage = DbManage(log_sql=True, dbname=dbname, root=conf['here'],
2642f128ad46 removed egg info, update files for distutils build
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
13 tests=False)
327
0e87466a117e updated installation instruction, made more user friendly way of creating all needed configs. All is done now from paster setup-app
Marcin Kuzminski <marcin@python-works.com>
parents: 0
diff changeset
14 dbmanage.create_tables(override=True)
552
2642f128ad46 removed egg info, update files for distutils build
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
15 dbmanage.config_prompt(None)
459
7c978511c951 implemented basic (startup) nose test suite.
Marcin Kuzminski <marcin@python-works.com>
parents: 417
diff changeset
16 dbmanage.create_default_user()
327
0e87466a117e updated installation instruction, made more user friendly way of creating all needed configs. All is done now from paster setup-app
Marcin Kuzminski <marcin@python-works.com>
parents: 0
diff changeset
17 dbmanage.admin_prompt()
0e87466a117e updated installation instruction, made more user friendly way of creating all needed configs. All is done now from paster setup-app
Marcin Kuzminski <marcin@python-works.com>
parents: 0
diff changeset
18 dbmanage.create_permissions()
417
3ed2d46a2ca7 permission refactoring,
Marcin Kuzminski <marcin@python-works.com>
parents: 365
diff changeset
19 dbmanage.populate_default_permissions()
555
03676d39dd0a added fault tolerant case when celeryconfig is not present in the directory.
Marcin Kuzminski <marcin@python-works.com>
parents: 552
diff changeset
20
03676d39dd0a added fault tolerant case when celeryconfig is not present in the directory.
Marcin Kuzminski <marcin@python-works.com>
parents: 552
diff changeset
21 load_environment(conf.global_conf, conf.local_conf, initial=True)
327
0e87466a117e updated installation instruction, made more user friendly way of creating all needed configs. All is done now from paster setup-app
Marcin Kuzminski <marcin@python-works.com>
parents: 0
diff changeset
22
552
2642f128ad46 removed egg info, update files for distutils build
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
23
2642f128ad46 removed egg info, update files for distutils build
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
24
2642f128ad46 removed egg info, update files for distutils build
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
25
2642f128ad46 removed egg info, update files for distutils build
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
26