Renders template directly to writer
482890
private final void renderContentTemplate(final ST contentTemplate, final Writer writer, final Map<String, Object> values/*, final String language*/, final ErrorBuffer error) {
        injectTemplateValues(contentTemplate, values);
//        if (language == null)
            contentTemplate.write(createSTWriter(writer), error);
//        else
//            contentTemplate.write(createSTWriter(writer), new Locale(language), error);
    }
990619
def render_template(self):
        """"""
        self._parse_paths()
        context = dict(napp=self._napp.__dict__, paths=self._paths)
        self._save(context)
1125808
def render_template(self, template, **kwargs):
        
        kwargs["base_template"] = self.appbuilder.base_template
        kwargs["appbuilder"] = self.appbuilder
        return render_template(
            template, **dict(list(kwargs.items()) + list(self.extra_args.items()))
        )
17424
def render(self, name, context):
        """"""
        if Generator.strict:
            self.env.undefined = TestableUndefined
        else:
            self.env.undefined = Undefined
        template = self.get_template(name)
        return template.render(context)
937884
def _put_template(params):
    
    f = open(_render(params['template']), 'r')
    template = f.read()

    run(_write_to(_render(template), _render(params['destination'])))
1270303
function renderString(templateString, options, callback) {
  var template = builtTemplateFromString(templateString, '', options);
  return template.render({ model: options, }, callback);
}
810997
def render(self, template, fail='## :todo: add {template}'):
        
        try:
            return self._templates[template].render(scaffold=self)
        except KeyError:
            return fail.format(template=template)
206713
def render_template_file(file_name, context):
    
    with open(file_name, 'r+') as f:
        template = Template(f.read())
        output = template.render(context)
        f.seek(0)
        f.write(output)
        f.truncate()
376718
def _render(self, value, format):
        
        template = '<script>\ndocument.write(moment(\"{t}\").{f});\n</script>'
        return Markup(template.format(t=value, f=format))
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)
584050
def render_template(self):
        """"""
        self.import_mappings()
        self.create_template()
        if self.description:
            self.set_template_description(self.description)
        self.setup_parameters()
        rendered = self.template.to_json(indent=self.context.template_indent)
        version = hashlib.md5(rendered.encode()).hexdigest()[:8]
        return (version, rendered)
488513
def process_templates(input_dir, target_dir, context):
    
    if not target_dir.endswith('/'):
        target_dir = "{}/".format(target_dir)
    if not os.path.exists(target_dir):
        LOGGER.info('Creating: {}'.format(target_dir))
        os.makedirs(target_dir)
    replicate_directory_tree(input_dir, target_dir)
    templates = find_templates(input_dir)
    for templ in templates:
        output_file = templ.replace(input_dir, target_dir)
        output_file = output_file[:-len('.mustache')]
        render_template(templ,  output_file, context)
745940
def render(self, **kwargs):
        """"""
        return self._template.render(this=self, kwargs=kwargs)
865638
public static Writer renderFromStr(String templateContent, Map<String, Object> bindingMap, Writer writer) {
		return render(getStrTemplate(templateContent), bindingMap, writer);
	}
687484
@Override
	public void process(Writer writer)
	{
		try
		{
			template.process(data, writer);
		}
		catch (IOException e)
		{
			throw new RuntimeException("Error writing template to writer", e);
		}
		catch (TemplateException e)
		{
			throw new RuntimeException(e.getMessage(), e);
		}
	}
564986
def render(self, template, context_stack, delimiters=None):
        
        parsed_template = parse(template, delimiters)

        return parsed_template.render(self, context_stack)
1258549
function renderTemplate(fragment, templateName) {
    if (templateName === 'none') return fragment._txt;
    var t = generator.template$[templateName];
    if (!t) {
      log('Unknown template %s for %s, using default.', templateName, fragment._href);
      t = generator.template$.default;
    }

    var out;
    try { out = t(fragment); }
    catch(err) {
      var msg = u.format('Error rendering %s\n\ntemplate: %s\n',
                         fragment._href, templateName, err.stack || err);
      log(msg);
      out = opts.production ? '' : '<pre>' + esc(msg) + '</pre>';
    }

    return out;
  }