from django import template
from django.utils.safestring import mark_safe

register = template.Library()


@register.filter()
def link(value):
    return mark_safe(f"<a href='{value.get_absolute_url()}'>" + str(value) + "</a>")
