mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-21 13:50:20 +08:00
Drop remaining uses of template_path config
This commit is contained in:
@@ -740,7 +740,6 @@ class GalaxyAppConfiguration(BaseAppConfiguration, CommonConfigurationMixin):
|
||||
for ip in kwargs.get("fetch_url_allowlist", "").split(',')
|
||||
if len(ip.strip()) > 0
|
||||
]
|
||||
self.template_path = self._in_root_dir(kwargs.get("template_path", "templates"))
|
||||
self.job_queue_cleanup_interval = int(kwargs.get("job_queue_cleanup_interval", "5"))
|
||||
self.cluster_files_directory = self._in_root_dir(self.cluster_files_directory)
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@ class Configuration:
|
||||
self.id_secret = kwargs.get("id_secret", "USING THE DEFAULT IS NOT SECURE!")
|
||||
self.use_remote_user = string_as_bool(kwargs.get("use_remote_user", "False"))
|
||||
self.require_login = string_as_bool(kwargs.get("require_login", "False"))
|
||||
self.template_path = resolve_path(kwargs.get("template_path", "templates"), self.root)
|
||||
self.template_cache_path = resolve_path(kwargs.get("template_cache_path", "database/compiled_templates/reports"), self.root)
|
||||
self.allow_user_creation = string_as_bool(kwargs.get("allow_user_creation", "True"))
|
||||
self.allow_user_deletion = string_as_bool(kwargs.get("allow_user_deletion", "False"))
|
||||
@@ -66,7 +65,7 @@ class Configuration:
|
||||
|
||||
def check(self):
|
||||
# Check that required directories exist
|
||||
for path in self.root, self.template_path:
|
||||
for path in (self.root, ):
|
||||
if not os.path.isdir(path):
|
||||
raise ConfigurationError(f"Directory does not exist: {path}")
|
||||
|
||||
|
||||
@@ -249,7 +249,6 @@ def setup_galaxy_config(
|
||||
master_api_key=master_api_key,
|
||||
running_functional_tests=True,
|
||||
template_cache_path=template_cache_path,
|
||||
template_path='templates',
|
||||
tool_config_file=tool_config_file,
|
||||
tool_data_table_config_path=tool_data_table_config_path,
|
||||
tool_parse_help=False,
|
||||
|
||||
@@ -89,7 +89,6 @@ class ToolShedTestDriver(driver_util.TestDriver):
|
||||
shed_tool_data_table_config=shed_tool_data_table_conf_file,
|
||||
smtp_server='smtp.dummy.string.tld',
|
||||
email_from='functional@localhost',
|
||||
template_path='templates',
|
||||
tool_parse_help=False,
|
||||
use_heartbeat=False)
|
||||
kwargs.update(toolshed_database_conf)
|
||||
|
||||
@@ -20,9 +20,6 @@ from galaxy.web.formatting import expand_pretty_datetime_format
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
ts_webapp_path = os.path.abspath(os.path.dirname(__file__))
|
||||
templates_path = os.path.join(ts_webapp_path, 'templates')
|
||||
|
||||
TOOLSHED_APP_NAME = 'tool_shed'
|
||||
TOOLSHED_CONFIG_SCHEMA_PATH = 'lib/tool_shed/webapp/config_schema.yml'
|
||||
|
||||
@@ -48,7 +45,6 @@ class ToolShedAppConfiguration(BaseAppConfiguration, CommonConfigurationMixin):
|
||||
paths_to_check = [
|
||||
self.file_path,
|
||||
self.hgweb_config_dir,
|
||||
self.template_path,
|
||||
self.tool_data_path,
|
||||
self.template_cache_path,
|
||||
os.path.join(self.tool_data_path, 'shared', 'jars'),
|
||||
@@ -95,7 +91,6 @@ class ToolShedAppConfiguration(BaseAppConfiguration, CommonConfigurationMixin):
|
||||
self.registration_warning_message = kwargs.get('registration_warning_message')
|
||||
self.email_domain_blocklist_content = None
|
||||
self.email_domain_allowlist_content = None
|
||||
self.template_path = templates_path
|
||||
self.template_cache_path = self._in_root_dir(kwargs.get('template_cache_path', 'database/compiled_templates/community'))
|
||||
self.error_email_to = kwargs.get('error_email_to')
|
||||
self.pretty_datetime_format = expand_pretty_datetime_format(self.pretty_datetime_format)
|
||||
|
||||
@@ -22,7 +22,7 @@ class TestWebapp(WebApplication):
|
||||
|
||||
|
||||
def test_galaxy_routes():
|
||||
test_config = Bunch(template_path="/tmp", template_cache_path="/tmp")
|
||||
test_config = Bunch(template_cache_path="/tmp")
|
||||
app = Bunch(config=test_config, security=object(), trace_logger=None, name="galaxy")
|
||||
test_webapp = TestWebapp(app)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user