Mercurial > kallithea
changeset 4218:f373f182b756 kallithea-2.2.5-rebrand
Drop rhodecode_ prefix for known setting names that are stored in kallithea_settings without prefix
line wrap: on
line diff
--- a/kallithea/controllers/admin/settings.py Wed Jul 02 19:08:30 2014 -0400 +++ b/kallithea/controllers/admin/settings.py Wed Jul 02 19:08:36 2014 -0400 @@ -246,23 +246,23 @@ try: sett1 = Setting.create_or_update('title', - form_result['rhodecode_title']) + form_result['title']) Session().add(sett1) sett2 = Setting.create_or_update('realm', - form_result['rhodecode_realm']) + form_result['realm']) Session().add(sett2) sett3 = Setting.create_or_update('ga_code', - form_result['rhodecode_ga_code']) + form_result['ga_code']) Session().add(sett3) sett4 = Setting.create_or_update('captcha_public_key', - form_result['rhodecode_captcha_public_key']) + form_result['captcha_public_key']) Session().add(sett4) sett5 = Setting.create_or_update('captcha_private_key', - form_result['rhodecode_captcha_private_key']) + form_result['captcha_private_key']) Session().add(sett5) Session().commit() @@ -306,16 +306,16 @@ try: settings = [ - ('show_public_icon', 'rhodecode_show_public_icon', 'bool'), - ('show_private_icon', 'rhodecode_show_private_icon', 'bool'), - ('stylify_metatags', 'rhodecode_stylify_metatags', 'bool'), - ('repository_fields', 'rhodecode_repository_fields', 'bool'), - ('dashboard_items', 'rhodecode_dashboard_items', 'int'), - ('admin_grid_items', 'rhodecode_admin_grid_items', 'int'), - ('show_version', 'rhodecode_show_version', 'bool'), - ('use_gravatar', 'rhodecode_use_gravatar', 'bool'), - ('gravatar_url', 'rhodecode_gravatar_url', 'unicode'), - ('clone_uri_tmpl', 'rhodecode_clone_uri_tmpl', 'unicode'), + ('show_public_icon', 'show_public_icon', 'bool'), + ('show_private_icon', 'show_private_icon', 'bool'), + ('stylify_metatags', 'stylify_metatags', 'bool'), + ('repository_fields', 'repository_fields', 'bool'), + ('dashboard_items', 'dashboard_items', 'int'), + ('admin_grid_items', 'admin_grid_items', 'int'), + ('show_version', 'show_version', 'bool'), + ('use_gravatar', 'use_gravatar', 'bool'), + ('gravatar_url', 'gravatar_url', 'unicode'), + ('clone_uri_tmpl', 'clone_uri_tmpl', 'unicode'), ] for setting, form_key, type_ in settings: sett = Setting.create_or_update(setting, @@ -464,7 +464,7 @@ import kallithea c.ini = kallithea.CONFIG - c.rhodecode_update_url = defaults.get('rhodecode_update_url') + c.update_url = defaults.get('update_url') server_info = Setting.get_server_info() for key, val in server_info.iteritems(): setattr(c, key, val) @@ -486,7 +486,7 @@ defaults = Setting.get_app_settings() defaults.update(self._get_hg_ui_settings()) - _update_url = defaults.get('rhodecode_update_url', '') + _update_url = defaults.get('update_url', '') _update_url = "" # FIXME: disabled _err = lambda s: '<div style="color:#ff8888; padding:4px 0px">%s</div>' % (s)
--- a/kallithea/controllers/error.py Wed Jul 02 19:08:30 2014 -0400 +++ b/kallithea/controllers/error.py Wed Jul 02 19:08:36 2014 -0400 @@ -55,7 +55,7 @@ def document(self): resp = request.environ.get('pylons.original_response') - c.site_name = config.get('rhodecode_title') + c.site_name = config.get('title') log.debug('### %s ###' % resp.status)
--- a/kallithea/controllers/login.py Wed Jul 02 19:08:30 2014 -0400 +++ b/kallithea/controllers/login.py Wed Jul 02 19:08:36 2014 -0400 @@ -166,9 +166,9 @@ .AuthUser.permissions['global'] settings = Setting.get_app_settings() - captcha_private_key = settings.get('rhodecode_captcha_private_key') + captcha_private_key = settings.get('captcha_private_key') c.captcha_active = bool(captcha_private_key) - c.captcha_public_key = settings.get('rhodecode_captcha_public_key') + c.captcha_public_key = settings.get('captcha_public_key') if request.POST: register_form = RegisterForm()() @@ -213,9 +213,9 @@ def password_reset(self): settings = Setting.get_app_settings() - captcha_private_key = settings.get('rhodecode_captcha_private_key') + captcha_private_key = settings.get('captcha_private_key') c.captcha_active = bool(captcha_private_key) - c.captcha_public_key = settings.get('rhodecode_captcha_public_key') + c.captcha_public_key = settings.get('captcha_public_key') if request.POST: password_reset_form = PasswordResetForm()()
--- a/kallithea/lib/base.py Wed Jul 02 19:08:30 2014 -0400 +++ b/kallithea/lib/base.py Wed Jul 02 19:08:36 2014 -0400 @@ -291,19 +291,19 @@ c.visual = AttributeDict({}) ## DB stored - c.visual.show_public_icon = str2bool(rc_config.get('rhodecode_show_public_icon')) - c.visual.show_private_icon = str2bool(rc_config.get('rhodecode_show_private_icon')) - c.visual.stylify_metatags = str2bool(rc_config.get('rhodecode_stylify_metatags')) - c.visual.dashboard_items = safe_int(rc_config.get('rhodecode_dashboard_items', 100)) - c.visual.admin_grid_items = safe_int(rc_config.get('rhodecode_admin_grid_items', 100)) - c.visual.repository_fields = str2bool(rc_config.get('rhodecode_repository_fields')) - c.visual.show_version = str2bool(rc_config.get('rhodecode_show_version')) - c.visual.use_gravatar = str2bool(rc_config.get('rhodecode_use_gravatar')) - c.visual.gravatar_url = rc_config.get('rhodecode_gravatar_url') + c.visual.show_public_icon = str2bool(rc_config.get('show_public_icon')) + c.visual.show_private_icon = str2bool(rc_config.get('show_private_icon')) + c.visual.stylify_metatags = str2bool(rc_config.get('stylify_metatags')) + c.visual.dashboard_items = safe_int(rc_config.get('dashboard_items', 100)) + c.visual.admin_grid_items = safe_int(rc_config.get('admin_grid_items', 100)) + c.visual.repository_fields = str2bool(rc_config.get('repository_fields')) + c.visual.show_version = str2bool(rc_config.get('show_version')) + c.visual.use_gravatar = str2bool(rc_config.get('use_gravatar')) + c.visual.gravatar_url = rc_config.get('gravatar_url') - c.ga_code = rc_config.get('rhodecode_ga_code') - c.site_name = rc_config.get('rhodecode_title') - c.clone_uri_tmpl = rc_config.get('rhodecode_clone_uri_tmpl') + c.ga_code = rc_config.get('ga_code') + c.site_name = rc_config.get('title') + c.clone_uri_tmpl = rc_config.get('clone_uri_tmpl') ## INI stored c.visual.allow_repo_location_change = str2bool(config.get('allow_repo_location_change', True))
--- a/kallithea/lib/dbmigrate/schema/db_1_2_0.py Wed Jul 02 19:08:30 2014 -0400 +++ b/kallithea/lib/dbmigrate/schema/db_1_2_0.py Wed Jul 02 19:08:36 2014 -0400 @@ -196,7 +196,7 @@ raise Exception('Could not get application settings !') settings = {} for each in ret: - settings['rhodecode_' + each.app_settings_name] = \ + settings[each.app_settings_name] = \ each.app_settings_value return settings
--- a/kallithea/lib/dbmigrate/schema/db_1_3_0.py Wed Jul 02 19:08:30 2014 -0400 +++ b/kallithea/lib/dbmigrate/schema/db_1_3_0.py Wed Jul 02 19:08:36 2014 -0400 @@ -215,7 +215,7 @@ raise Exception('Could not get application settings !') settings = {} for each in ret: - settings['rhodecode_' + each.app_settings_name] = \ + settings[each.app_settings_name] = \ each.app_settings_value return settings
--- a/kallithea/lib/dbmigrate/schema/db_1_4_0.py Wed Jul 02 19:08:30 2014 -0400 +++ b/kallithea/lib/dbmigrate/schema/db_1_4_0.py Wed Jul 02 19:08:36 2014 -0400 @@ -213,7 +213,7 @@ raise Exception('Could not get application settings !') settings = {} for each in ret: - settings['rhodecode_' + each.app_settings_name] = \ + settings[each.app_settings_name] = \ each.app_settings_value return settings @@ -794,7 +794,7 @@ # inject ui extra param to log this action via push logger for k, v in extras.items(): - repo._repo.ui.setconfig('rhodecode_extras', k, v) + repo._repo.ui.setconfig('extras', k, v) @classmethod def is_valid(cls, repo_name):
--- a/kallithea/lib/dbmigrate/schema/db_1_5_0.py Wed Jul 02 19:08:30 2014 -0400 +++ b/kallithea/lib/dbmigrate/schema/db_1_5_0.py Wed Jul 02 19:08:36 2014 -0400 @@ -216,7 +216,7 @@ raise Exception('Could not get application settings !') settings = {} for each in ret: - settings['rhodecode_' + each.app_settings_name] = \ + settings[each.app_settings_name] = \ each.app_settings_value return settings @@ -813,7 +813,7 @@ # inject ui extra param to log this action via push logger for k, v in extras.items(): - repo._repo.ui.setconfig('rhodecode_extras', k, v) + repo._repo.ui.setconfig('extras', k, v) @classmethod def is_valid(cls, repo_name):
--- a/kallithea/lib/dbmigrate/schema/db_1_5_2.py Wed Jul 02 19:08:30 2014 -0400 +++ b/kallithea/lib/dbmigrate/schema/db_1_5_2.py Wed Jul 02 19:08:36 2014 -0400 @@ -217,7 +217,7 @@ raise Exception('Could not get application settings !') settings = {} for each in ret: - settings['rhodecode_' + each.app_settings_name] = \ + settings[each.app_settings_name] = \ each.app_settings_value return settings @@ -879,7 +879,7 @@ # inject ui extra param to log this action via push logger for k, v in extras.items(): - repo._repo.ui.setconfig('rhodecode_extras', k, v) + repo._repo.ui.setconfig('extras', k, v) @classmethod def is_valid(cls, repo_name):
--- a/kallithea/lib/dbmigrate/schema/db_1_6_0.py Wed Jul 02 19:08:30 2014 -0400 +++ b/kallithea/lib/dbmigrate/schema/db_1_6_0.py Wed Jul 02 19:08:36 2014 -0400 @@ -217,7 +217,7 @@ raise Exception('Could not get application settings !') settings = {} for each in ret: - settings['rhodecode_' + each.app_settings_name] = \ + settings[each.app_settings_name] = \ each.app_settings_value return settings @@ -977,7 +977,7 @@ if self.locked[1] else None ) rc_config = Setting.get_app_settings() - repository_fields = str2bool(rc_config.get('rhodecode_repository_fields')) + repository_fields = str2bool(rc_config.get('repository_fields')) if repository_fields: for f in self.extra_fields: data[f.field_key_prefixed] = f.field_value
--- a/kallithea/lib/dbmigrate/schema/db_1_7_0.py Wed Jul 02 19:08:30 2014 -0400 +++ b/kallithea/lib/dbmigrate/schema/db_1_7_0.py Wed Jul 02 19:08:36 2014 -0400 @@ -222,7 +222,7 @@ raise Exception('Could not get application settings !') settings = {} for each in ret: - settings['rhodecode_' + each.app_settings_name] = \ + settings[each.app_settings_name] = \ each.app_settings_value return settings @@ -1006,7 +1006,7 @@ if self.locked[1] else None ) rc_config = Setting.get_app_settings() - repository_fields = str2bool(rc_config.get('rhodecode_repository_fields')) + repository_fields = str2bool(rc_config.get('repository_fields')) if repository_fields: for f in self.extra_fields: data[f.field_key_prefixed] = f.field_value
--- a/kallithea/lib/dbmigrate/schema/db_1_8_0.py Wed Jul 02 19:08:30 2014 -0400 +++ b/kallithea/lib/dbmigrate/schema/db_1_8_0.py Wed Jul 02 19:08:36 2014 -0400 @@ -224,7 +224,7 @@ raise Exception('Could not get application settings !') settings = {} for each in ret: - settings['rhodecode_' + each.app_settings_name] = \ + settings[each.app_settings_name] = \ each.app_settings_value return settings @@ -1036,7 +1036,7 @@ if self.locked[1] else None ) rc_config = Setting.get_app_settings() - repository_fields = str2bool(rc_config.get('rhodecode_repository_fields')) + repository_fields = str2bool(rc_config.get('repository_fields')) if repository_fields: for f in self.extra_fields: data[f.field_key_prefixed] = f.field_value
--- a/kallithea/lib/dbmigrate/schema/db_2_0_0.py Wed Jul 02 19:08:30 2014 -0400 +++ b/kallithea/lib/dbmigrate/schema/db_2_0_0.py Wed Jul 02 19:08:36 2014 -0400 @@ -265,7 +265,7 @@ raise Exception('Could not get application settings !') settings = {} for each in ret: - settings['rhodecode_' + each.app_settings_name] = \ + settings[each.app_settings_name] = \ each.app_settings_value return settings @@ -1093,7 +1093,7 @@ if self.locked[1] else None ) rc_config = Setting.get_app_settings() - repository_fields = str2bool(rc_config.get('rhodecode_repository_fields')) + repository_fields = str2bool(rc_config.get('repository_fields')) if repository_fields: for f in self.extra_fields: data[f.field_key_prefixed] = f.field_value
--- a/kallithea/lib/dbmigrate/schema/db_2_0_1.py Wed Jul 02 19:08:30 2014 -0400 +++ b/kallithea/lib/dbmigrate/schema/db_2_0_1.py Wed Jul 02 19:08:36 2014 -0400 @@ -268,7 +268,7 @@ raise Exception('Could not get application settings !') settings = {} for each in ret: - settings['rhodecode_' + each.app_settings_name] = \ + settings[each.app_settings_name] = \ each.app_settings_value return settings @@ -1092,7 +1092,7 @@ if self.locked[1] else None ) rc_config = Setting.get_app_settings() - repository_fields = str2bool(rc_config.get('rhodecode_repository_fields')) + repository_fields = str2bool(rc_config.get('repository_fields')) if repository_fields: for f in self.extra_fields: data[f.field_key_prefixed] = f.field_value
--- a/kallithea/lib/dbmigrate/schema/db_2_0_2.py Wed Jul 02 19:08:30 2014 -0400 +++ b/kallithea/lib/dbmigrate/schema/db_2_0_2.py Wed Jul 02 19:08:36 2014 -0400 @@ -268,7 +268,7 @@ raise Exception('Could not get application settings !') settings = {} for each in ret: - settings['rhodecode_' + each.app_settings_name] = \ + settings[each.app_settings_name] = \ each.app_settings_value return settings @@ -1109,7 +1109,7 @@ if self.locked[1] else None ) rc_config = Setting.get_app_settings() - repository_fields = str2bool(rc_config.get('rhodecode_repository_fields')) + repository_fields = str2bool(rc_config.get('repository_fields')) if repository_fields: for f in self.extra_fields: data[f.field_key_prefixed] = f.field_value
--- a/kallithea/lib/dbmigrate/schema/db_2_1_0.py Wed Jul 02 19:08:30 2014 -0400 +++ b/kallithea/lib/dbmigrate/schema/db_2_1_0.py Wed Jul 02 19:08:36 2014 -0400 @@ -271,7 +271,7 @@ raise Exception('Could not get application settings !') settings = {} for each in ret: - settings['rhodecode_' + each.app_settings_name] = \ + settings[each.app_settings_name] = \ each.app_settings_value return settings @@ -1148,7 +1148,7 @@ if self.locked[1] else None ) rc_config = Setting.get_app_settings() - repository_fields = str2bool(rc_config.get('rhodecode_repository_fields')) + repository_fields = str2bool(rc_config.get('repository_fields')) if repository_fields: for f in self.extra_fields: data[f.field_key_prefixed] = f.field_value
--- a/kallithea/lib/dbmigrate/schema/db_2_2_0.py Wed Jul 02 19:08:30 2014 -0400 +++ b/kallithea/lib/dbmigrate/schema/db_2_2_0.py Wed Jul 02 19:08:36 2014 -0400 @@ -272,7 +272,7 @@ raise Exception('Could not get application settings !') settings = {} for each in ret: - settings['rhodecode_' + each.app_settings_name] = \ + settings[each.app_settings_name] = \ each.app_settings_value return settings @@ -1188,7 +1188,7 @@ if self.locked[1] else None ) rc_config = Setting.get_app_settings() - repository_fields = str2bool(rc_config.get('rhodecode_repository_fields')) + repository_fields = str2bool(rc_config.get('repository_fields')) if repository_fields: for f in self.extra_fields: data[f.field_key_prefixed] = f.field_value
--- a/kallithea/lib/dbmigrate/schema/db_2_2_3.py Wed Jul 02 19:08:30 2014 -0400 +++ b/kallithea/lib/dbmigrate/schema/db_2_2_3.py Wed Jul 02 19:08:36 2014 -0400 @@ -272,7 +272,7 @@ raise Exception('Could not get application settings !') settings = {} for each in ret: - settings['rhodecode_' + each.app_settings_name] = \ + settings[each.app_settings_name] = \ each.app_settings_value return settings @@ -1208,7 +1208,7 @@ if self.locked[1] else None ) rc_config = Setting.get_app_settings() - repository_fields = str2bool(rc_config.get('rhodecode_repository_fields')) + repository_fields = str2bool(rc_config.get('repository_fields')) if repository_fields: for f in self.extra_fields: data[f.field_key_prefixed] = f.field_value
--- a/kallithea/lib/middleware/simplegit.py Wed Jul 02 19:08:30 2014 -0400 +++ b/kallithea/lib/middleware/simplegit.py Wed Jul 02 19:08:36 2014 -0400 @@ -131,7 +131,7 @@ # If not authenticated by the container, running basic auth if not username: self.authenticate.realm = \ - safe_str(self.config['rhodecode_realm']) + safe_str(self.config['realm']) result = self.authenticate(environ) if isinstance(result, str): AUTH_TYPE.update(environ, 'basic')
--- a/kallithea/lib/middleware/simplehg.py Wed Jul 02 19:08:30 2014 -0400 +++ b/kallithea/lib/middleware/simplehg.py Wed Jul 02 19:08:36 2014 -0400 @@ -135,7 +135,7 @@ # If not authenticated by the container, running basic auth if not username: self.authenticate.realm = \ - safe_str(self.config['rhodecode_realm']) + safe_str(self.config['realm']) result = self.authenticate(environ) if isinstance(result, str): AUTH_TYPE.update(environ, 'basic')
--- a/kallithea/model/db.py Wed Jul 02 19:08:30 2014 -0400 +++ b/kallithea/model/db.py Wed Jul 02 19:08:36 2014 -0400 @@ -272,7 +272,7 @@ raise Exception('Could not get application settings !') settings = {} for each in ret: - settings['rhodecode_' + each.app_settings_name] = \ + settings[each.app_settings_name] = \ each.app_settings_value return settings @@ -1208,7 +1208,7 @@ if self.locked[1] else None ) rc_config = Setting.get_app_settings() - repository_fields = str2bool(rc_config.get('rhodecode_repository_fields')) + repository_fields = str2bool(rc_config.get('repository_fields')) if repository_fields: for f in self.extra_fields: data[f.field_key_prefixed] = f.field_value
--- a/kallithea/model/forms.py Wed Jul 02 19:08:30 2014 -0400 +++ b/kallithea/model/forms.py Wed Jul 02 19:08:36 2014 -0400 @@ -303,11 +303,11 @@ class _ApplicationSettingsForm(formencode.Schema): allow_extra_fields = True filter_extra_fields = False - rhodecode_title = v.UnicodeString(strip=True, not_empty=False) - rhodecode_realm = v.UnicodeString(strip=True, min=1, not_empty=True) - rhodecode_ga_code = v.UnicodeString(strip=True, min=1, not_empty=False) - rhodecode_captcha_public_key = v.UnicodeString(strip=True, min=1, not_empty=False) - rhodecode_captcha_private_key = v.UnicodeString(strip=True, min=1, not_empty=False) + title = v.UnicodeString(strip=True, not_empty=False) + realm = v.UnicodeString(strip=True, min=1, not_empty=True) + ga_code = v.UnicodeString(strip=True, min=1, not_empty=False) + captcha_public_key = v.UnicodeString(strip=True, min=1, not_empty=False) + captcha_private_key = v.UnicodeString(strip=True, min=1, not_empty=False) return _ApplicationSettingsForm @@ -316,18 +316,18 @@ class _ApplicationVisualisationForm(formencode.Schema): allow_extra_fields = True filter_extra_fields = False - rhodecode_show_public_icon = v.StringBoolean(if_missing=False) - rhodecode_show_private_icon = v.StringBoolean(if_missing=False) - rhodecode_stylify_metatags = v.StringBoolean(if_missing=False) + show_public_icon = v.StringBoolean(if_missing=False) + show_private_icon = v.StringBoolean(if_missing=False) + stylify_metatags = v.StringBoolean(if_missing=False) - rhodecode_repository_fields = v.StringBoolean(if_missing=False) - rhodecode_lightweight_journal = v.StringBoolean(if_missing=False) - rhodecode_dashboard_items = v.Int(min=5, not_empty=True) - rhodecode_admin_grid_items = v.Int(min=5, not_empty=True) - rhodecode_show_version = v.StringBoolean(if_missing=False) - rhodecode_use_gravatar = v.StringBoolean(if_missing=False) - rhodecode_gravatar_url = v.UnicodeString(min=3) - rhodecode_clone_uri_tmpl = v.UnicodeString(min=3) + repository_fields = v.StringBoolean(if_missing=False) + lightweight_journal = v.StringBoolean(if_missing=False) + dashboard_items = v.Int(min=5, not_empty=True) + admin_grid_items = v.Int(min=5, not_empty=True) + show_version = v.StringBoolean(if_missing=False) + use_gravatar = v.StringBoolean(if_missing=False) + gravatar_url = v.UnicodeString(min=3) + clone_uri_tmpl = v.UnicodeString(min=3) return _ApplicationVisualisationForm
--- a/kallithea/templates/admin/settings/settings_global.html Wed Jul 02 19:08:30 2014 -0400 +++ b/kallithea/templates/admin/settings/settings_global.html Wed Jul 02 19:08:36 2014 -0400 @@ -5,48 +5,48 @@ <div class="field"> <div class="label"> - <label for="rhodecode_title">${_('Site branding')}:</label> + <label for="title">${_('Site branding')}:</label> </div> <div class="input"> - ${h.text('rhodecode_title',size=30)} + ${h.text('title',size=30)} <span class="help-block">${_('Set a custom title for your Kallithea Service.')}</span> </div> </div> <div class="field"> <div class="label"> - <label for="rhodecode_realm">${_('HTTP authentication realm')}:</label> + <label for="realm">${_('HTTP authentication realm')}:</label> </div> <div class="input"> - ${h.text('rhodecode_realm',size=30)} + ${h.text('realm',size=30)} </div> </div> <div class="field"> <div class="label"> - <label for="rhodecode_ga_code">${_('Google Analytics code')}:</label> + <label for="ga_code">${_('Google Analytics code')}:</label> </div> <div class="input"> - ${h.text('rhodecode_ga_code',size=30)} + ${h.text('ga_code',size=30)} </div> </div> <div class="field"> <div class="label"> - <label for="rhodecode_captcha_public_key">${_('ReCaptcha public key')}:</label> + <label for="captcha_public_key">${_('ReCaptcha public key')}:</label> </div> <div class="input"> - ${h.text('rhodecode_captcha_public_key',size=60)} + ${h.text('captcha_public_key',size=60)} <span class="help-block">${_('Public key for reCaptcha system.')}</span> </div> </div> <div class="field"> <div class="label"> - <label for="rhodecode_captcha_private_key">${_('ReCaptcha private key')}:</label> + <label for="captcha_private_key">${_('ReCaptcha private key')}:</label> </div> <div class="input"> - ${h.text('rhodecode_captcha_private_key',size=60)} + ${h.text('captcha_private_key',size=60)} <span class="help-block">${_('Private key for reCaptcha system. Setting this value will enable captcha on registration')}</span> </div> </div>
--- a/kallithea/templates/admin/settings/settings_system.html Wed Jul 02 19:08:30 2014 -0400 +++ b/kallithea/templates/admin/settings/settings_system.html Wed Jul 02 19:08:36 2014 -0400 @@ -6,7 +6,7 @@ (_('Platform'), c.platform, ''), (_('GIT version'), c.git_version, ''), (_('GIT path'), c.ini.get('git_path'), ''), - (_('Upgrade info endpoint'), h.literal('%s <br/><span style="color:#999999">%s.</span>' % (c.rhodecode_update_url, _('Note: please make sure this server can access this url'))), ''), + (_('Upgrade info endpoint'), h.literal('%s <br/><span style="color:#999999">%s.</span>' % (c.update_url, _('Note: please make sure this server can access this url'))), ''), ] %>
--- a/kallithea/templates/admin/settings/settings_visual.html Wed Jul 02 19:08:30 2014 -0400 +++ b/kallithea/templates/admin/settings/settings_visual.html Wed Jul 02 19:08:36 2014 -0400 @@ -9,24 +9,24 @@ </div> <div class="checkboxes"> <div class="checkbox"> - ${h.checkbox('rhodecode_repository_fields','True')} - <label for="rhodecode_repository_fields">${_('Use repository extra fields')}</label> + ${h.checkbox('repository_fields','True')} + <label for="repository_fields">${_('Use repository extra fields')}</label> </div> <span class="help-block">${_('Allows storing additional customized fields per repository.')}</span> <div class="checkbox"> - ${h.checkbox('rhodecode_show_version','True')} - <label for="rhodecode_show_version">${_('Show Kallithea version')}</label> + ${h.checkbox('show_version','True')} + <label for="show_version">${_('Show Kallithea version')}</label> </div> <span class="help-block">${_('Shows or hides a version number of Kallithea displayed in the footer.')}</span> <div class="checkbox"> - ${h.checkbox('rhodecode_use_gravatar','True')} - <label for="rhodecode_use_gravatar">${_('Use Gravatars in Kallithea')}</label> + ${h.checkbox('use_gravatar','True')} + <label for="use_gravatar">${_('Use Gravatars in Kallithea')}</label> </div> </div> <div class="field"> <div class="input"> - ${h.text('rhodecode_gravatar_url', size=80)} + ${h.text('gravatar_url', size=80)} <span class="help-block">${_('''Gravatar url allows you to use other avatar server application. Following variables of the URL will be replaced accordingly. {scheme} 'http' or 'https' sent from running Kallithea server, @@ -38,7 +38,7 @@ </div> <div class="field"> <div class="input"> - ${h.text('rhodecode_clone_uri_tmpl', size=80)} + ${h.text('clone_uri_tmpl', size=80)} <span class="help-block">${_('''Schema of clone url construction eg. '{scheme}://{user}@{netloc}/{repo}', available vars: {scheme} 'http' or 'https' sent from running Kallithea server, {user} current user username, @@ -51,20 +51,20 @@ <div class="field"> <div class="label"> - <label for="rhodecode_dashboard_items">${_('Dashboard items')}:</label> + <label for="dashboard_items">${_('Dashboard items')}:</label> </div> <div class="input"> - ${h.text('rhodecode_dashboard_items',size=5)} + ${h.text('dashboard_items',size=5)} <span class="help-block">${_('Number of items displayed in the main page dashboard before pagination is shown.')}</span> </div> </div> <div class="field"> <div class="label"> - <label for="rhodecode_admin_grid_items">${_('Admin pages items')}:</label> + <label for="admin_grid_items">${_('Admin pages items')}:</label> </div> <div class="input"> - ${h.text('rhodecode_admin_grid_items',size=5)} + ${h.text('admin_grid_items',size=5)} <span class="help-block">${_('Number of items displayed in the admin pages grids before pagination is shown.')}</span> </div> </div> @@ -75,12 +75,12 @@ </div> <div class="checkboxes"> <div class="checkbox"> - ${h.checkbox('rhodecode_show_public_icon','True')} - <label for="rhodecode_show_public_icon">${_('Show public repo icon on repositories')}</label> + ${h.checkbox('show_public_icon','True')} + <label for="show_public_icon">${_('Show public repo icon on repositories')}</label> </div> <div class="checkbox"> - ${h.checkbox('rhodecode_show_private_icon','True')} - <label for="rhodecode_show_private_icon">${_('Show private repo icon on repositories')}</label> + ${h.checkbox('show_private_icon','True')} + <label for="show_private_icon">${_('Show private repo icon on repositories')}</label> </div> <span class="help-block">${_('Show public/private icons next to repositories names.')}</span> </div> @@ -92,8 +92,8 @@ </div> <div class="checkboxes"> <div class="checkbox"> - ${h.checkbox('rhodecode_stylify_metatags','True')} - <label for="rhodecode_stylify_metatags">${_('Stylify recognised meta tags:')}</label> + ${h.checkbox('stylify_metatags','True')} + <label for="stylify_metatags">${_('Stylify recognised meta tags:')}</label> </div> <div style="padding-left: 20px;"> <ul> <!-- Fix style here -->
--- a/kallithea/tests/functional/test_admin_settings.py Wed Jul 02 19:08:30 2014 -0400 +++ b/kallithea/tests/functional/test_admin_settings.py Wed Jul 02 19:08:36 2014 -0400 @@ -80,17 +80,17 @@ old_realm = 'Kallithea authentication' new_ga_code = 'ga-test-123456789' response = self.app.post(url('admin_settings_global'), - params=dict(rhodecode_title=old_title, - rhodecode_realm=old_realm, - rhodecode_ga_code=new_ga_code, - rhodecode_captcha_private_key='', - rhodecode_captcha_public_key='', + params=dict(title=old_title, + realm=old_realm, + ga_code=new_ga_code, + captcha_private_key='', + captcha_public_key='', )) self.checkSessionFlash(response, 'Updated application settings') self.assertEqual(Setting - .get_app_settings()['rhodecode_ga_code'], new_ga_code) + .get_app_settings()['ga_code'], new_ga_code) response = response.follow() response.mustcontain("""_gaq.push(['_setAccount', '%s']);""" % new_ga_code) @@ -101,16 +101,16 @@ old_realm = 'Kallithea authentication' new_ga_code = '' response = self.app.post(url('admin_settings_global'), - params=dict(rhodecode_title=old_title, - rhodecode_realm=old_realm, - rhodecode_ga_code=new_ga_code, - rhodecode_captcha_private_key='', - rhodecode_captcha_public_key='', + params=dict(title=old_title, + realm=old_realm, + ga_code=new_ga_code, + captcha_private_key='', + captcha_public_key='', )) self.checkSessionFlash(response, 'Updated application settings') self.assertEqual(Setting - .get_app_settings()['rhodecode_ga_code'], new_ga_code) + .get_app_settings()['ga_code'], new_ga_code) response = response.follow() response.mustcontain(no=["_gaq.push(['_setAccount', '%s']);" % new_ga_code]) @@ -121,16 +121,16 @@ old_realm = 'Kallithea authentication' new_ga_code = '' response = self.app.post(url('admin_settings_global'), - params=dict(rhodecode_title=old_title, - rhodecode_realm=old_realm, - rhodecode_ga_code=new_ga_code, - rhodecode_captcha_private_key='1234567890', - rhodecode_captcha_public_key='1234567890', + params=dict(title=old_title, + realm=old_realm, + ga_code=new_ga_code, + captcha_private_key='1234567890', + captcha_public_key='1234567890', )) self.checkSessionFlash(response, 'Updated application settings') self.assertEqual(Setting - .get_app_settings()['rhodecode_captcha_private_key'], '1234567890') + .get_app_settings()['captcha_private_key'], '1234567890') response = self.app.get(url('register')) response.mustcontain('captcha') @@ -141,16 +141,16 @@ old_realm = 'Kallithea authentication' new_ga_code = '' response = self.app.post(url('admin_settings_global'), - params=dict(rhodecode_title=old_title, - rhodecode_realm=old_realm, - rhodecode_ga_code=new_ga_code, - rhodecode_captcha_private_key='', - rhodecode_captcha_public_key='1234567890', + params=dict(title=old_title, + realm=old_realm, + ga_code=new_ga_code, + captcha_private_key='', + captcha_public_key='1234567890', )) self.checkSessionFlash(response, 'Updated application settings') self.assertEqual(Setting - .get_app_settings()['rhodecode_captcha_private_key'], '') + .get_app_settings()['captcha_private_key'], '') response = self.app.get(url('register')) response.mustcontain(no=['captcha']) @@ -163,16 +163,16 @@ for new_title in ['Changed', 'Żółwik', old_title]: response = self.app.post(url('admin_settings_global'), - params=dict(rhodecode_title=new_title, - rhodecode_realm=old_realm, - rhodecode_ga_code='', - rhodecode_captcha_private_key='', - rhodecode_captcha_public_key='', + params=dict(title=new_title, + realm=old_realm, + ga_code='', + captcha_private_key='', + captcha_public_key='', )) self.checkSessionFlash(response, 'Updated application settings') self.assertEqual(Setting - .get_app_settings()['rhodecode_title'], + .get_app_settings()['title'], new_title.decode('utf-8')) response = response.follow()