annotate rhodecode/websetup.py @ 4147:1c8f818787b3 rhodecode-2.2.5-gpl

old style: show the full link box on summary page - no overlap or truncation
author Mads Kiilerich <madski@unity3d.com>
date Wed, 02 Jul 2014 19:03:23 -0400
parents ffd45b185016
children 7e5f8c12a3fc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
841
78b3d2d730f2 fixed import problems
Marcin Kuzminski <marcin@python-works.com>
parents: 834
diff changeset
1 # -*- coding: utf-8 -*-
1206
a671db5bdd58 fixed license issue #149
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
2 # This program is free software: you can redistribute it and/or modify
a671db5bdd58 fixed license issue #149
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
3 # it under the terms of the GNU General Public License as published by
a671db5bdd58 fixed license issue #149
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
4 # the Free Software Foundation, either version 3 of the License, or
a671db5bdd58 fixed license issue #149
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
5 # (at your option) any later version.
1203
6832ef664673 source code cleanup: remove trailing white space, normalize file endings
Marcin Kuzminski <marcin@python-works.com>
parents: 1094
diff changeset
6 #
841
78b3d2d730f2 fixed import problems
Marcin Kuzminski <marcin@python-works.com>
parents: 834
diff changeset
7 # This program is distributed in the hope that it will be useful,
78b3d2d730f2 fixed import problems
Marcin Kuzminski <marcin@python-works.com>
parents: 834
diff changeset
8 # but WITHOUT ANY WARRANTY; without even the implied warranty of
78b3d2d730f2 fixed import problems
Marcin Kuzminski <marcin@python-works.com>
parents: 834
diff changeset
9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
78b3d2d730f2 fixed import problems
Marcin Kuzminski <marcin@python-works.com>
parents: 834
diff changeset
10 # GNU General Public License for more details.
1203
6832ef664673 source code cleanup: remove trailing white space, normalize file endings
Marcin Kuzminski <marcin@python-works.com>
parents: 1094
diff changeset
11 #
841
78b3d2d730f2 fixed import problems
Marcin Kuzminski <marcin@python-works.com>
parents: 834
diff changeset
12 # You should have received a copy of the GNU General Public License
1206
a671db5bdd58 fixed license issue #149
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
13 # along with this program. If not, see <http://www.gnu.org/licenses/>.
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3700
diff changeset
14 """
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3700
diff changeset
15 rhodecode.websetup
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3700
diff changeset
16 ~~~~~~~~~~~~~~~~~~
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3700
diff changeset
17
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3700
diff changeset
18 Weboperations and setup for rhodecode
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3700
diff changeset
19
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3700
diff changeset
20 :created_on: Dec 11, 2010
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3700
diff changeset
21 :author: marcink
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3700
diff changeset
22 :copyright: (c) 2013 RhodeCode GmbH.
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3700
diff changeset
23 :license: GPLv3, see LICENSE for more details.
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3700
diff changeset
24 """
841
78b3d2d730f2 fixed import problems
Marcin Kuzminski <marcin@python-works.com>
parents: 834
diff changeset
25
78b3d2d730f2 fixed import problems
Marcin Kuzminski <marcin@python-works.com>
parents: 834
diff changeset
26 import logging
78b3d2d730f2 fixed import problems
Marcin Kuzminski <marcin@python-works.com>
parents: 834
diff changeset
27
547
1e757ac98988 renamed project to rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents: 491
diff changeset
28 from rhodecode.config.environment import load_environment
1e757ac98988 renamed project to rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents: 491
diff changeset
29 from rhodecode.lib.db_manage import DbManage
1734
48d4fcf04a29 another major refactoring with session management
Marcin Kuzminski <marcin@python-works.com>
parents: 1206
diff changeset
30 from rhodecode.model.meta import Session
841
78b3d2d730f2 fixed import problems
Marcin Kuzminski <marcin@python-works.com>
parents: 834
diff changeset
31
469
e94f4e54dc03 tests fix, put vcs testing tarball
Marcin Kuzminski <marcin@python-works.com>
parents: 459
diff changeset
32
0
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
33 log = logging.getLogger(__name__)
473
6b934c9607e7 Improved testing scenarios. Made test env creator
Marcin Kuzminski <marcin@python-works.com>
parents: 469
diff changeset
34
1205
f4807acf643d added __license__ into main of rhodecode, PEP8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1203
diff changeset
35
0
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
36 def setup_app(command, conf, vars):
547
1e757ac98988 renamed project to rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents: 491
diff changeset
37 """Place any commands to setup rhodecode here"""
781
7ae66bddf48d fixed db manage, to work on other databases than sqlite
Marcin Kuzminski <marcin@python-works.com>
parents: 555
diff changeset
38 dbconf = conf['sqlalchemy.db1.url']
1205
f4807acf643d added __license__ into main of rhodecode, PEP8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1203
diff changeset
39 dbmanage = DbManage(log_sql=True, dbconf=dbconf, root=conf['here'],
2919
29630805893d Implemented proposed changes from pull request #77
Marcin Kuzminski <marcin@python-works.com>
parents: 2827
diff changeset
40 tests=False, cli_args=command.options.__dict__)
29630805893d Implemented proposed changes from pull request #77
Marcin Kuzminski <marcin@python-works.com>
parents: 2827
diff changeset
41 dbmanage.create_tables(override=True)
834
8924ed0e4f36 added current db version into rhodecode,
Marcin Kuzminski <marcin@python-works.com>
parents: 781
diff changeset
42 dbmanage.set_db_version()
2919
29630805893d Implemented proposed changes from pull request #77
Marcin Kuzminski <marcin@python-works.com>
parents: 2827
diff changeset
43 opts = dbmanage.config_prompt(None)
2284
e285aa097a81 new setup-rhodecode command with optional defaults
Marcin Kuzminski <marcin@python-works.com>
parents: 1824
diff changeset
44 dbmanage.create_settings(opts)
459
7c978511c951 implemented basic (startup) nose test suite.
Marcin Kuzminski <marcin@python-works.com>
parents: 417
diff changeset
45 dbmanage.create_default_user()
2919
29630805893d Implemented proposed changes from pull request #77
Marcin Kuzminski <marcin@python-works.com>
parents: 2827
diff changeset
46 dbmanage.admin_prompt()
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
47 dbmanage.create_permissions()
417
3ed2d46a2ca7 permission refactoring,
Marcin Kuzminski <marcin@python-works.com>
parents: 365
diff changeset
48 dbmanage.populate_default_permissions()
2919
29630805893d Implemented proposed changes from pull request #77
Marcin Kuzminski <marcin@python-works.com>
parents: 2827
diff changeset
49 Session().commit()
555
03676d39dd0a added fault tolerant case when celeryconfig is not present in the directory.
Marcin Kuzminski <marcin@python-works.com>
parents: 552
diff changeset
50 load_environment(conf.global_conf, conf.local_conf, initial=True)
3232
99c093d1a142 run waitress check on startup
Marcin Kuzminski <marcin@python-works.com>
parents: 2919
diff changeset
51 DbManage.check_waitress()