diff --git a/main/templatetags/details_link.py b/main/templatetags/details_link.py index af45100a..ea86608f 100644 --- a/main/templatetags/details_link.py +++ b/main/templatetags/details_link.py @@ -3,6 +3,7 @@ from django import template from django.conf import settings +from django.utils.html import format_html from main.templatetags import pgp from main.utils import gitlab_project_name_to_path @@ -18,9 +19,10 @@ def link_encode(url, query): return "%s?%s" % (url, data) -@register.inclusion_tag('packages/details_link.html') +@register.simple_tag def details_link(pkg): - return {'pkg': pkg} + link = '%s' + return format_html(link % (pkg.get_absolute_url(), pkg.pkgname, pkg.pkgname)) @register.simple_tag diff --git a/templates/packages/details_link.html b/templates/packages/details_link.html deleted file mode 100644 index 41983375..00000000 --- a/templates/packages/details_link.html +++ /dev/null @@ -1 +0,0 @@ -{{ pkg.pkgname }} \ No newline at end of file