code: def handle_var(value, context):
      
      # Resolve FilterExpression and Variable immediately
      if isinstance(value, FilterExpression) or isinstance(value, Variable):
          return value.resolve(context)
      # Return quoted strings unquoted
      # http://djangosnippets.org/snippets/886
      stringval = QUOTED_STRING.search(value)
      if stringval:
          return stringval.group("noquotes")
      # Resolve variable or return string value
      try:
          return Variable(value).resolve(context)
      except VariableDoesNotExist:
          return value
docs: Handle template tag variable