mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-06 02:58:25 -04:00
registered convert_markdown formatter in __init__.
This commit is contained in:
@@ -39,6 +39,7 @@ from app.asset_fingerprinter import asset_fingerprinter
|
|||||||
from app.config import configs
|
from app.config import configs
|
||||||
from app.extensions import redis_client, zendesk_client
|
from app.extensions import redis_client, zendesk_client
|
||||||
from app.formatters import (
|
from app.formatters import (
|
||||||
|
convert_markdown_template,
|
||||||
convert_to_boolean,
|
convert_to_boolean,
|
||||||
format_auth_type,
|
format_auth_type,
|
||||||
format_billions,
|
format_billions,
|
||||||
@@ -582,6 +583,7 @@ def add_template_filters(application):
|
|||||||
format_mobile_network,
|
format_mobile_network,
|
||||||
format_yes_no,
|
format_yes_no,
|
||||||
square_metres_to_square_miles,
|
square_metres_to_square_miles,
|
||||||
|
convert_markdown_template
|
||||||
]:
|
]:
|
||||||
application.add_template_filter(fn)
|
application.add_template_filter(fn)
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,9 @@ from app.utils.time import parse_naive_dt
|
|||||||
|
|
||||||
|
|
||||||
def convert_markdown_template(mdf, test=False):
|
def convert_markdown_template(mdf, test=False):
|
||||||
|
|
||||||
|
content_text = ""
|
||||||
|
|
||||||
if not test:
|
if not test:
|
||||||
APP_ROOT = get_root_path('notifications-admin')
|
APP_ROOT = get_root_path('notifications-admin')
|
||||||
file = 'app/content/' + mdf + '.md'
|
file = 'app/content/' + mdf + '.md'
|
||||||
|
|||||||
Reference in New Issue
Block a user