old_contents: 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)
  
new_contents: 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)
  
subject: Use simple_tag decorators as those tags can now also be used for assignments