Changeset - 56dadd0e5cf7
[Not reviewed]
Bradley M. Kuhn - 11 years ago 2014-07-03 01:08:36
bkuhn@sfconservancy.org
db: tweak configuration of branding self references

For RhodeCode compatibility:
echo "BRAND='rhodecode'" > kallithea/brand.py
1 file changed with 14 insertions and 11 deletions:
0 comments (0 inline, 0 general)
kallithea/__init__.py
Show inline comments
 
@@ -35,37 +35,40 @@ BACKENDS = {
 
    'git': 'Git repository',
 
}
 

	
 
CELERY_ON = False
 
CELERY_EAGER = False
 

	
 
# link to config for pylons
 
CONFIG = {}
 

	
 
# Linked module for extensions
 
EXTENSIONS = {}
 

	
 
# SETTINGS_PREFIX is the prefix to use for form fields and database table names.
 
# BRAND controls internal references in database and config to the products
 
# own name.
 
#
 
# NOTE: If you want compatibility with a database that was originally created
 
#  for use with the RhodeCode software product, change BRAND to "rhodecode",
 
#  either by editing here or by creating a new file:
 
#  echo "BRAND = 'rhodecode'" > kallithea/brand.py
 

	
 
#  Ideally, SETTINGS_PREFIX would be in an ini file of some sort instead of
 
#  in this code.  However, since this is used in kallithea/model/db.py as
 
#  part of the database initialization in code that typically runs before
 
#  CONFIG (above) is populated with settings from the ini file, it's instead
 
#  hard-coded herein.
 
BRAND = "kallithea"
 
try:
 
    from kallithea.brand import BRAND
 
except ImportError:
 
    pass
 

	
 
SETTINGS_PREFIX = "kallithea_"
 
# NOTE: If you want compatibility with a database that was originally created
 
#  for use with the Rhodecode software product, changing SETTINGS_PREFIX to
 
#  "rhodecode_" might work to make the old database and forms compatible with
 
#  this application.
 
# Prefix for the ui and settings table names
 
SETTINGS_PREFIX = BRAND + "_"
 

	
 
try:
 
    from kallithea.lib import get_current_revision
 
    _rev = get_current_revision(quiet=True)
 
    if _rev and len(VERSION) > 3:
 
        VERSION += ('%s' % _rev[0],)
 
except ImportError:
 
    pass
 

	
 
__version__ = ('.'.join((str(each) for each in VERSION[:3])))
 
__dbversion__ = 31  # defines current db version for migrations
 
__platform__ = platform.system()
0 comments (0 inline, 0 general)