Add template tag for truning links into <a/>

This commit is contained in:
Aroy-Art 2024-10-24 22:29:35 +02:00
parent 46ac248b6b
commit 688ae1d4b3
Signed by: Aroy
GPG key ID: DB9689E9391DD156

View file

@ -1,6 +1,8 @@
from django import template from django import template
from utils.strings import convert_size from utils.strings import (
convert_size,
aTag_urls,
register = template.Library() register = template.Library()
@ -16,3 +18,7 @@ def size_to_human_readable (size):
The human-readable size format. The human-readable size format.
""" """
return convert_size(size) return convert_size(size)
@register.filter
def clickable_urls(string):
return aTag_urls(string)