code: def template_exists(template_name):
      '''
      Determine if a given template exists so that it can be loaded
      if so, or a default alternative can be used if not.
      '''
      try:
          template.loader.get_template(template_name)
          return True
      except template.TemplateDoesNotExist:
          return Falsf template_exists(template_name):
      '''
      Determine if a given template exists so that it can be loaded
      if so, or a default alternative can be used if not.
      '''
      try:
          template.loader.get_template(template_name)
          return True
      except template.TemplateDoesNotExist:
          return False
docs: Determine if a given template exists so that it can be loaded
      if so, or a default alternative can be used if not.