Skip to content

Commit

Permalink
Access build_absolute_uri via template tag #3692
Browse files Browse the repository at this point in the history
  • Loading branch information
joemull committed Sep 13, 2023
1 parent d4999b8 commit e8b40a7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/templatetags/fqdn.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,9 @@ def external_journal_url(journal, url_name=None, *args):
path = None

return journal.site_url(path=path)


@register.simple_tag(takes_context=True)
def build_absolute_uri(context, relative_url, *args):
request = context.get('request')
return request.build_absolute_uri(relative_url)

0 comments on commit e8b40a7

Please sign in to comment.