mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-16 07:19:13 +08:00
Use galaxy directory helper to determine template path
This commit is contained in:
@@ -66,10 +66,15 @@ from galaxy.tool_util.deps.containers import NullContainerFinder
|
||||
from galaxy.tools import ToolBox
|
||||
from galaxy.tools.cache import ToolCache
|
||||
from galaxy.tools.data import ToolDataTableManager
|
||||
from galaxy.util import StructuredExecutionTimer
|
||||
from galaxy.util import (
|
||||
galaxy_directory,
|
||||
StructuredExecutionTimer,
|
||||
)
|
||||
from galaxy.util.bunch import Bunch
|
||||
from galaxy.web_stack import ApplicationStack
|
||||
|
||||
glx_dir = galaxy_directory()
|
||||
|
||||
|
||||
# =============================================================================
|
||||
def buildMockEnviron(**kwargs):
|
||||
@@ -376,7 +381,8 @@ class MockTrans:
|
||||
|
||||
def fill_template(self, filename, template_lookup=None, **kwargs):
|
||||
if template_lookup is None:
|
||||
template_lookup = mako.lookup.TemplateLookup(directories="templates/")
|
||||
template_path = os.path.join(glx_dir, "templates")
|
||||
template_lookup = mako.lookup.TemplateLookup(directories=template_path)
|
||||
template = template_lookup.get_template(filename)
|
||||
kwargs.update(h=MockTemplateHelpers())
|
||||
return template.render(**kwargs)
|
||||
|
||||
@@ -18,7 +18,6 @@ from . import VisualizationsBase_TestCase
|
||||
|
||||
glx_dir = galaxy_directory()
|
||||
template_cache_dir = os.path.join(glx_dir, "database", "compiled_templates")
|
||||
additional_templates_dir = os.path.join(glx_dir, "config", "plugins", "visualizations", "common", "templates")
|
||||
vis_reg_path = "config/plugins/visualizations"
|
||||
|
||||
config1 = """\
|
||||
|
||||
Reference in New Issue
Block a user