From 1c5f74bd182eb502e27d03cc7f93e5e0db8c3362 Mon Sep 17 00:00:00 2001 From: smilerz Date: Tue, 20 Apr 2021 12:24:05 -0500 Subject: [PATCH] change markdown link from hard-coded to reverse --- cookbook/templates/forms/edit_internal_recipe.html | 3 ++- cookbook/templatetags/custom_tags.py | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cookbook/templates/forms/edit_internal_recipe.html b/cookbook/templates/forms/edit_internal_recipe.html index b6725948d..27e44f092 100644 --- a/cookbook/templates/forms/edit_internal_recipe.html +++ b/cookbook/templates/forms/edit_internal_recipe.html @@ -374,7 +374,8 @@ - {% trans 'You can use markdown to format this field. See the docs here' %} + {% markdown_link as markdown_link %} + {{ markdown_link|safe }} diff --git a/cookbook/templatetags/custom_tags.py b/cookbook/templatetags/custom_tags.py index b1876c233..abc6ff7de 100644 --- a/cookbook/templatetags/custom_tags.py +++ b/cookbook/templatetags/custom_tags.py @@ -108,6 +108,11 @@ def is_debug(): return settings.DEBUG +@register.simple_tag() +def markdown_link(): + return f"{_('You can use markdown to format this field. See the ')}{_('docs here')}" + + @register.simple_tag def base_path(request, path_type): if path_type == 'base':