Fix template discovery path

This commit is contained in:
dgtlmoon
2026-01-02 14:49:27 +01:00
parent 40dc3fef7e
commit df8f86ccbf
2 changed files with 11 additions and 4 deletions
+8 -1
View File
@@ -430,7 +430,14 @@ def get_plugin_template_paths():
Returns:
list: List of absolute paths to plugin template directories
"""
template_paths = ['changedetectionio/processors/templates']
template_paths = []
# Add the base processors/templates directory (as absolute path)
processors_templates_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'processors', 'templates')
if os.path.isdir(processors_templates_dir):
template_paths.append(processors_templates_dir)
logger.debug(f"Added base processors template path: {processors_templates_dir}")
# Scan built-in processor plugins
from changedetectionio.processors import find_processors
processor_list = find_processors()
+3 -3
View File
@@ -26,6 +26,9 @@ def test_check_extract_text_from_diff(client, live_server, measure_memory_usage,
assert b"1 Imported" in res.data
wait_for_all_checks(client)
res = client.get(url_for("ui.ui_diff.diff_history_page_extract_GET", uuid="first"))
assert res.status_code == 200
assert b'extract_regex' in res.data
# Load in 5 different numbers/changes
last_date=""
@@ -40,9 +43,6 @@ def test_check_extract_text_from_diff(client, live_server, measure_memory_usage,
client.get(url_for("ui.form_watch_checknow"), follow_redirects=True)
wait_for_all_checks(client)
res = client.get(url_for("ui.ui_diff.diff_history_page_extract_POST", uuid="first"))
assert res.status_code == 200
assert b'extract_regex' in res.data
res = client.post(