From 97093dc87e84fa6e3b2b528251ea03ce32376393 Mon Sep 17 00:00:00 2001 From: amercader Date: Fri, 10 May 2019 15:18:14 +0200 Subject: [PATCH] [#4779] Remove Boostrap 2 templates option Leave the config option and mechanism to switch templates in place in case we re-use in the future, but only accepting the current values. --- ckan/config/deployment.ini_tmpl | 4 ---- ckan/config/environment.py | 8 ++++---- doc/maintaining/configuration.rst | 22 ++++------------------ 3 files changed, 8 insertions(+), 26 deletions(-) diff --git a/ckan/config/deployment.ini_tmpl b/ckan/config/deployment.ini_tmpl index 0ed97f60336..767d81e86a2 100644 --- a/ckan/config/deployment.ini_tmpl +++ b/ckan/config/deployment.ini_tmpl @@ -119,10 +119,6 @@ ckan.views.default_views = image_view text_view recline_view ## Front-End Settings -# Uncomment following configuration to enable using of Bootstrap 2 -#ckan.base_public_folder = public-bs2 -#ckan.base_templates_folder = templates-bs2 - ckan.site_title = CKAN ckan.site_logo = /base/images/ckan-logo.png ckan.site_description = diff --git a/ckan/config/environment.py b/ckan/config/environment.py index 963d7e5d726..2beaed1fad1 100644 --- a/ckan/config/environment.py +++ b/ckan/config/environment.py @@ -76,14 +76,14 @@ def find_controller(self, controller): # Pylons paths root = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) - valid_base_public_folder_names = ['public', 'public-bs2'] + valid_base_public_folder_names = ['public'] static_files = app_conf.get('ckan.base_public_folder', 'public') app_conf['ckan.base_public_folder'] = static_files if static_files not in valid_base_public_folder_names: raise CkanConfigurationException( 'You provided an invalid value for ckan.base_public_folder. ' - 'Possible values are: "public" and "public-bs2".' + 'Possible values are: "public".' ) log.info('Loading static files from %s' % static_files) @@ -248,14 +248,14 @@ def update_config(): config['pylons.h'] = helpers.helper_functions # Templates and CSS loading from configuration - valid_base_templates_folder_names = ['templates', 'templates-bs2'] + valid_base_templates_folder_names = ['templates'] templates = config.get('ckan.base_templates_folder', 'templates') config['ckan.base_templates_folder'] = templates if templates not in valid_base_templates_folder_names: raise CkanConfigurationException( 'You provided an invalid value for ckan.base_templates_folder. ' - 'Possible values are: "templates" and "templates-bs2".' + 'Possible values are: "templates".' ) jinja2_templates_path = os.path.join(root, templates) diff --git a/doc/maintaining/configuration.rst b/doc/maintaining/configuration.rst index df30d5abf93..ec396afe5fa 100644 --- a/doc/maintaining/configuration.rst +++ b/doc/maintaining/configuration.rst @@ -1430,15 +1430,8 @@ Example:: Default value: ``public`` This config option is used to configure the base folder for static files used -by CKAN core. It's used to determine which version of Bootstrap to be used. -It accepts two values: ``public`` (Bootstrap 3, the default value from CKAN -2.8 onwards) and ``public-bs2`` (Bootstrap 2, used until CKAN 2.7). - -It must be used in conjunction with :ref:`ckan.base_templates_folder` in order -for it to properly function. Also, you can't use for example Bootstrap 3 for -static files and Bootstrap 2 for templates or vice versa. - -.. note:: Starting with CKAN 2.8, Bootstrap 3 will be used as a default. +by CKAN core. It is currently unused and it only accepts one value: ``public`` +(Bootstrap 3, the default value from CKAN 2.8 onwards). .. _ckan.base_templates_folder: @@ -1452,15 +1445,8 @@ Example:: Default value: ``templates`` This config option is used to configure the base folder for templates used -by CKAN core. It's used to determine which version of Bootstrap to be used. -It accepts two values: ``templates`` (Bootstrap 3, the default value from CKAN -2.8 onwards) and ``templates-bs2`` (Bootstrap 2, used until CKAN 2.7). - -It must be used in conjunction with :ref:`ckan.base_public_folder` in order -for it to properly function. Also, you can't use for example Bootstrap 3 for -templates and Bootstrap 2 for static files or vice versa. - -.. note:: Starting with CKAN 2.8, Bootstrap 3 will be used as a default. +by CKAN core. It is currently unused and it only accepts one vaue: ``templates`` +(Bootstrap 3, the default value from CKAN 2.8 onwards). .. end_config-theming