Render helper method. Allows to render partials within template files.
972794
function(filename) {
        var filepath = options.cwd + filename;
        var template = readTemplateFile({ src: [ filepath ] });
        return grunt.template.process(template, options);
      }
16865
function(view, data, helpers, callback) {
                    return can.view.renderAs("string", view, data, helpers, callback);
                }
1123004
def render_template(template_file, template_vars):
    """"""
    # Load our Jinja templates
    template_dir = "{0}/templates".format(
        os.path.dirname(os.path.abspath(__file__))
    )
    jinja_env = jinja2.Environment(
        loader=jinja2.FileSystemLoader(template_dir),
        trim_blocks=True
    )
    rendered = jinja_env.get_template(template_file).render(template_vars)

    return rendered
1285218
def render(filename, obj):
    """"""
    template_path = abspath(filename)
    env = jinja_env(template_path)
    template_base = os.path.basename(template_path)
    try:
        parsed_content = env.parse(env
                                   .loader
                                   .get_source(env, template_base))
        template_vars = meta.find_undeclared_variables(parsed_content)
        if template_vars:
            missing_vars(template_vars, parsed_content, obj)

        LOG.debug("rendering %s with %s vars",
                  template_path, len(template_vars))
        return env \
            .get_template(template_base) \
            .render(**obj)
    except jinja2.exceptions.TemplateSyntaxError as exception:
        template_trace = traceback.format_tb(sys.exc_info()[2])
        # Different error context depending on whether it is the
        # pre-render variable scan or not
        if exception.filename:
            template_line = template_trace[len(template_trace) - 1]
            raise aomi_excep.Validation("Bad template %s %s" %
                                        (template_line,
                                         str(exception)))

        template_str = ''
        if isinstance(exception.source, tuple):
            # PyLint seems confused about whether or not this is a tuple
            # pylint: disable=locally-disabled, unsubscriptable-object
            template_str = "Embedded Template\n%s" % exception.source[0]

        raise aomi_excep.Validation("Bad template %s" % str(exception),
                                    source=template_str)

    except jinja2.exceptions.UndefinedError as exception:
        template_traces = [x.strip()
                           for x in traceback.format_tb(sys.exc_info()[2])
                           if 'template code' in x]
        raise aomi_excep.Validation("Missing template variable %s" %
                                    ' '.join(template_traces))
1058569
def _render_pipeline(path)
      filename_parts= path.split('.')
      begin
        ext= filename_parts.pop
        template_class= Renderer.for(ext)
        yield template_class unless template_class.nil?
      end while !template_class.nil? #and filename_parts.size
    end
27233
def can_render(self, partial_mimetype):
        
        for mime in self.render_map.keys():
            if mime == '*/*':
                return True
            if partial_mimetype in mime:
                return True
        return False
103995
def render_template(templates_path, template_filename, context):
        """"""
        template_env = Environment(
            autoescape=False, trim_blocks=False,
            loader=FileSystemLoader(str(templates_path)))
        return template_env.get_template(str(template_filename)) \
            .render(context)
1119818
def _render(self, contexts, partials):
        """"""
        val = self._lookup(self.value, contexts)
        if val:
            return EMPTYSTRING
        return self._render_children(contexts, partials)
863080
def render_template(template_in, file_out, context):
    
    renderer = pystache.Renderer()
    result = renderer.render_path(template_in, context)
    with open(file_out, 'w') as handle:
        LOGGER.info('Rendering: {} to {}'.format(template_in, file_out))
        handle.write(result)
    shutil.copymode(template_in, file_out)
1112719
function (templatesMap, partialsMap) {
  var compiledHtml = [];

  for (let templateName in templatesMap) {
    let template = templatesMap[templateName].template;
    let templateData = templatesMap[templateName].data;

    compiledHtml.push(mustache.render(template, templateData, partialsMap));
  }

  return compiledHtml;
}
745940
def render(self, **kwargs):
        """"""
        return self._template.render(this=self, kwargs=kwargs)
1001906
def render_template(template, **context):
    
    parts = template.split('/')
    renderer = _get_renderer(parts[:-1])
    return renderer.render(renderer.load_template(parts[-1:][0]), context)
273619
function render_with_layout(template, locals, cb) {
    render_file(locals, function(err, str) {
      if (err) {
        return cb(err);
      }

      locals.body = str;

      var res = template(locals, handlebarsOpts);
      self.async.done(function(values) {
        Object.keys(values).forEach(function(id) {
          res = res.replace(id, values[id]);
        });

        cb(null, res);
      });
    });
  }
698592
def _render_template(options)
        if options.delete(:stream)
          Rack::Chunked::Body.new view_renderer.render_body(view_context, options)
        else
          super
        end
      end
941799
def render_impl(template_file, ctx=None, paths=None, filters=None):
    
    env = tmpl_env(make_template_paths(template_file, paths))

    if env is None:
        return copen(template_file).read()

    if filters is not None:
        env.filters.update(filters)

    if ctx is None:
        ctx = {}

    return env.get_template(os.path.basename(template_file)).render(**ctx)
412884
function renderPatternPartial(patternId, drizzleData, Handlebars) {
  const patternObj = deepPattern(patternId, drizzleData.patterns);
  const localContext = patternContext(patternObj, drizzleData);
  let template = Handlebars.partials[patternId];
  if (typeof template !== 'undefined') {
    if (typeof template !== 'function') {
      template = Handlebars.compile(template);
    }
    // Render and return
    return template(localContext);
  }
  DrizzleError.error(
    new DrizzleError(
      `Partial for pattern ${patternId} not found`,
      DrizzleError.LEVELS.ERROR
    ),
    drizzleData.options.debug
  );
}
861882
def render_template_file(template, context=None):
    
    assert isinstance(context, Mapping)
    template = get_template(template)
    return template.render(context)