mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-30 18:13:23 +08:00
Remove comments/logging
This commit is contained in:
@@ -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
|
||||
|
||||
"""
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
Reference in New Issue
Block a user