From 688ae1d4b3db9a4e1ac13f8911d02b4bc849f9f8 Mon Sep 17 00:00:00 2001 From: Aroy-Art Date: Thu, 24 Oct 2024 22:29:35 +0200 Subject: [PATCH] Add template tag for truning links into --- archivist/apps/sites/templatetags/string_helper.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/archivist/apps/sites/templatetags/string_helper.py b/archivist/apps/sites/templatetags/string_helper.py index 92116f8..0fcb7a5 100644 --- a/archivist/apps/sites/templatetags/string_helper.py +++ b/archivist/apps/sites/templatetags/string_helper.py @@ -1,6 +1,8 @@ from django import template -from utils.strings import convert_size +from utils.strings import ( + convert_size, + aTag_urls, register = template.Library() @@ -16,3 +18,7 @@ def size_to_human_readable (size): The human-readable size format. """ return convert_size(size) + +@register.filter +def clickable_urls(string): + return aTag_urls(string)