Add template tag for truning links into <a/>
This commit is contained in:
parent
46ac248b6b
commit
688ae1d4b3
1 changed files with 7 additions and 1 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue