from django import template


register = template.Library()


@register.assignment_tag(takes_context=True)
def build_absolute_uri(context, url):
    if url:
        return context['request'].build_absolute_uri(url)

from django import template


register = template.Library()


@register.simple_tag(takes_context=True)
def build_absolute_uri(context, url):
    if url:
        return context['request'].build_absolute_uri(url)

Use simple_tag decorators as those tags can now also be used for assignments
Use simple_tag decorators as those tags can now also be used for assignments
