docs: def resolve_template(template):
      "Accepts a template object, path-to-template or list of paths"
      if isinstance(template, (list, tuple)):
          return loader.select_template(template)
      elif isinstance(template, basestring):
          try:
              return loader.get_template(template)
          except TemplateDoesNotExist:
              return None
      else:
          return template