registered convert_markdown formatter in __init__.

This commit is contained in:
Anastasia Gradova
2023-12-27 12:59:45 -07:00
parent 051d7767d9
commit 7af656e9f9
2 changed files with 5 additions and 0 deletions

View File

@@ -39,6 +39,7 @@ from app.asset_fingerprinter import asset_fingerprinter
from app.config import configs
from app.extensions import redis_client, zendesk_client
from app.formatters import (
convert_markdown_template,
convert_to_boolean,
format_auth_type,
format_billions,
@@ -582,6 +583,7 @@ def add_template_filters(application):
format_mobile_network,
format_yes_no,
square_metres_to_square_miles,
convert_markdown_template
]:
application.add_template_filter(fn)

View File

@@ -25,6 +25,9 @@ from app.utils.time import parse_naive_dt
def convert_markdown_template(mdf, test=False):
content_text = ""
if not test:
APP_ROOT = get_root_path('notifications-admin')
file = 'app/content/' + mdf + '.md'