code: def template_name(self, path, base):
          
          if not base:
              path = os.path.basename(path)
          if path == base:
              base = os.path.dirname(path)
          name = re.sub(r"^%s[\/\\]?(.*)%s$" % (
              re.escape(base), re.escape(settings.TEMPLATE_EXT)
          ), r"\1", path)
          return re.sub(r"[\/\\]", settings.TEMPLATE_SEPARATOR, name)
docs: Find out the name of a JS template