diff --git a/lib/galaxy/util/custom_templates/template.py b/lib/galaxy/util/custom_templates/template.py index 066a878aa33..19d1a1d6639 100644 --- a/lib/galaxy/util/custom_templates/template.py +++ b/lib/galaxy/util/custom_templates/template.py @@ -7,11 +7,8 @@ the Galaxy root (config/templates). """ import os -import logging from jinja2 import Environment -logger = logging.getLogger(__name__) - DEFAULT_TEMPLATES_DIR = "config/templates" TEMPLATE_SEP = '>>>>>>' # Used to split templates into doc/body sections @@ -28,25 +25,6 @@ def _get_template_path(relpath: str, custom_templates_dir: str) -> str: """Return template file path.""" default_path = os.path.join(DEFAULT_TEMPLATES_DIR, relpath) custom_path = os.path.join(custom_templates_dir, relpath) - logger.info(f"Custom templates_dir defined as: {custom_templates_dir}") if os.path.exists(custom_path): - logger.info(f"Using custom template: {custom_path}") return custom_path return default_path - - -"""TODO - -- [x] New conf for template_dir relative to conf_dir -- [x] Copy templates to here -- [x] Source templates from templates_dir -- [x] Default templates from config/templates -- [x] Add config exception to .gitignore: !config/templates/ -- [x] Add config exception to .gitignore: !config/templates/ - -- [x] Jinja-fy template syntax -- [x] Add conditional rendering to templates to exclude null vars -- [x] Test -- [ ] Write tests - -""" diff --git a/test/unit/app/managers/test_UserManager.py b/test/unit/app/managers/test_UserManager.py index 032101abc0e..33452c80a1d 100644 --- a/test/unit/app/managers/test_UserManager.py +++ b/test/unit/app/managers/test_UserManager.py @@ -218,21 +218,7 @@ class TestUserManager(BaseTestCase): ) def test_register_user_activation(self): - # Set config.user_activation_on = True - # Leave templates_dir to default - # Create user request - # Trap/assert email sent - # Assert email content text/html == default - - # Set templates_dir to custom - # (No custom template created for text) - # Trap/assert email sent - # Assert email content text/html == default - - # Set templates_dir to custom - # Create custom template for text - # Trap/assert email sent - # Assert email content text/html == custom + pass # =============================================================================