##// END OF EJS Templates
Turbogears2 migration: use sqlalchemy.url iso sqlalchemy.db1.url...
Turbogears2 migration: use sqlalchemy.url iso sqlalchemy.db1.url In Turbogears2, much of the application initialization is handled by the framework, whereas in Pylons the application was responsible for it. Initializing SQLAlchemy is one such part of initialization which is handled by Turbogears2. Turbogears2 expects the configuration file to refer to the database using 'sqlalchemy.url' rather than the current 'sqlalchemy.db1.url'. While the exact name is not really important, not following this approach means we'll need to override the sqlalchemy initialization method. Therefore, as a preparation to the Turbogears2 migration, already change the database reference string under Pylons. When upgrading to a version of Kallithea containing this commit, the .ini file will manually need to be adapted to remove the .db1 strings.

File last commit:

r6169:a9b9af11 default
r6177:f973b866 default
Show More
__init__.py
63 lines | 1.8 KiB | text/x-python | PythonLexer
# -*- coding: utf-8 -*-
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
kallithea
~~~~~~~~~
Kallithea, a web based repository management based on pylons
versioning implementation: http://www.python.org/dev/peps/pep-0386/
This file was forked by the Kallithea project in July 2014.
Original author and date, and relevant copyright and licensing information is below:
:created_on: Apr 9, 2010
:author: marcink
:copyright: (c) 2013 RhodeCode GmbH, (C) 2014 Bradley M. Kuhn, and others.
:license: GPLv3, see LICENSE.md for more details.
"""
import sys
import platform
VERSION = (0, 3, 99)
BACKENDS = {
'hg': 'Mercurial repository',
'git': 'Git repository',
}
CELERY_ON = False
CELERY_EAGER = False
# link to config for pylons
CONFIG = {}
# Linked module for extensions
EXTENSIONS = {}
try:
import kallithea.brand
except ImportError:
pass
else:
assert False, 'Database rebranding is no longer supported; see README.'
__version__ = '.'.join(str(each) for each in VERSION)
__platform__ = platform.system()
__license__ = 'GPLv3'
__py_version__ = sys.version_info
__author__ = "Various Authors"
__url__ = 'https://kallithea-scm.org/'
is_windows = __platform__ in ['Windows']
is_unix = not is_windows