change markdown link from hard-coded to reverse

This commit is contained in:
smilerz
2021-04-20 12:24:05 -05:00
parent 76c56e2a06
commit 1c5f74bd18
2 changed files with 7 additions and 1 deletions

View File

@@ -374,7 +374,8 @@
<label :for="'id_instruction_' + step.id">{% trans 'Instructions' %}</label>
<b-form-textarea class="form-control" rows="2" max-rows="20" v-model="step.instruction"
:id="'id_instruction_' + step.id"></b-form-textarea>
<small class="text-muted">{% trans 'You can use markdown to format this field. See the <a href="/docs/markdown/">docs here</a>' %}</small>
{% markdown_link as markdown_link %}
<small class="text-muted">{{ markdown_link|safe }}</small>
</div>
</div>
</div>

View File

@@ -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 ')}<a target='_blank' href='{reverse('docs_markdown')}'>{_('docs here')}</a>"
@register.simple_tag
def base_path(request, path_type):
if path_type == 'base':