Render a given template with any extra URL parameters in the context as
    ``{{ params }}``.
487261
def direct_to_template(
        request, template, extra_context=None, mimetype=None, **kwargs):
    
    if extra_context is None:
        extra_context = {}
    dictionary = {'params': kwargs}
    for key, value in extra_context.items():
        if callable(value):
            dictionary[key] = value()
        else:
            dictionary[key] = value
    t = loader.get_template(template)
    return HttpResponse(
        t.render(context=dictionary, request=request),
        content_type=mimetype)
1228016
function renderView(router, view, template, params) {
  router.$viewport.css('opacity', 0);

  setTimeout(() => {
    router.$viewport.removeChildren();
    // TODO Remove all event listeners in $viewport, to avoid memory leaks.
    $body.scrollTop = 0;
    router.$viewport.html = template;
    Browser.resize();
    Browser.replaceSvgImports();
    router.$viewport.css({ opacity: 1, 'pointer-events': 'all' });
    document.title = router.$viewport.$('title').text;
    router.initialise(router.$viewport, params);
    if (view.enter) view.enter(router.$viewport, params);
    router.trigger('afterChange', {$viewport: router.$viewport});
  }, 350);
}
1103283
def prepare(self, context):
        
        self.params = {}

        # no params, not even a newline
        if not self.nodelist:
            return

        # just static text, no vars, assume one TextNode
        if not self.nodelist.contains_nontext:
            text = self.nodelist[0].s.strip()

        # vars in params, we have to render
        else:
            context.push()
            context['object'] = self.obj
            text = self.nodelist.render(context)
            context.pop()

        if text:
            self.params = self.resolve_params(text)

        # override the default template from the parameters
        if 'template_name' in self.params:
            self.template_name = self.params['template_name']
742557
def render(template)
      template.render(config.variables.deep_merge(options[:globals]), strict_variables: true).tap do
        if template.errors&.length&.positive?
          puts template.errors
          raise template.errors.map(&:to_s).join('; ')
        end
      end
    end
564986
def render(self, template, context_stack, delimiters=None):
        
        parsed_template = parse(template, delimiters)

        return parsed_template.render(self, context_stack)
1140477
function template(str, params){
  return str.replace(/%(\w*)%/g, function(m, key){
    return params[key];
  });
}
594056
def render(template_name, extra_environments=None, **kwargs):
    
    if extra_environments is None:
        extra_environments = {}
    default_loader = PackageLoader('dodotable', 'templates')
    loader = extra_environments.get(
        'template_loader',
        default_loader)
    if not loader:
        loader = default_loader
    get_translations = extra_environments.get('get_translations')
    env = Environment(loader=loader,
                      extensions=['jinja2.ext.i18n', 'jinja2.ext.with_'],
                      autoescape=True)
    env.globals.update(extra_environments)
    translations = get_translations() if callable(get_translations) else None
    if translations is None:
        translations = gettext.NullTranslations()
    env.install_gettext_translations(translations)
    template = env.get_template(template_name)
    return template.render(**kwargs)
861882
def render_template_file(template, context=None):
    
    assert isinstance(context, Mapping)
    template = get_template(template)
    return template.render(context)
1001906
def render_template(template, **context):
    
    parts = template.split('/')
    renderer = _get_renderer(parts[:-1])
    return renderer.render(renderer.load_template(parts[-1:][0]), context)
1094882
def custom_render_template(template_name_or_list, **context):
    
    response_str = render_template(
        functools.reduce(lambda x, y: x + [os.path.join('custom', y), y],
                         to_list(template_name_or_list), []),
        **context
    )
    if hasattr(g, 'status_code'):
        status_code = g.status_code
    else:
        status_code = 200
    return response_str, status_code
40296
function renderParam(key, valueDict) {
    var paramDiv = $('<div class="status-param">');

    var nameDiv = $('<span class="status-param-name">');
    nameDiv.text(key + ':');
    paramDiv.append(nameDiv);

    if (valueDict.type == 'slot' && STATUS_MAP.slots) {
      paramDiv.append(renderSlot(valueDict.slotKey));
    } else {
      var valueDiv = $('<span class="status-param-value">');
      renderCollapsableValue(valueDict.value, valueDiv);
      paramDiv.append(valueDiv);
    }

    return paramDiv;
  }
1169032
def render(request, templates, dictionary=None, context_instance=None,
           **kwargs):
    

    warnings.warn(
        "yacms.utils.views.render is deprecated and will be removed "
        "in a future version. Please update your project to use Django's "
        "TemplateResponse, which now provides equivalent functionality.",
        DeprecationWarning
    )

    dictionary = dictionary or {}
    if context_instance:
        context_instance.update(dictionary)
    else:
        context_instance = RequestContext(request, dictionary)
    return TemplateResponse(request, templates, context_instance, **kwargs)
684561
def render_js_template(self, template_path, element_id, context=None):
        
        context = context or {}
        return u"<script type='text/template' id='{}'>\n{}\n</script>".format(
            element_id,
            self.render_template(template_path, context)
        )
923840
def render(self, context, db=None, safe_mode=False, extra_context=None):
        """"""
        if not db:
            raise MissingParameterError(
                "db",
                context=self.error_context
            )
        rendered_views = dict()
        path_instances = db.query(self.path.query, safe_mode=safe_mode)
        extra_ctx = copy(extra_context) if extra_context else dict()

        for inst in path_instances:
            extra_ctx.update({
                self.path.variable: inst
            })
            ctx = context.build(
                db=db,
                safe_mode=safe_mode,
                for_each_inst=inst,
                extra=extra_ctx
            )
            inst_path = self.path.render(inst=inst, context=ctx)
            rendered_view = self.template.render(ctx)
            rendered_views = deep_merge_dict(
                rendered_views,
                dict_from_path(inst_path, final_value=rendered_view)
            )
        return rendered_views
965742
def render(self, name, value, attrs=None, renderer=None):
        
        context = self.get_context(name, value, attrs)
        return self._render(self.template_name, context, renderer)
1359440
def _handle_template_param_value(self):
        """"""
        self._emit_all(self._pop())
        self._context ^= contexts.TEMPLATE_PARAM_KEY
        self._context |= contexts.TEMPLATE_PARAM_VALUE
        self._emit(tokens.TemplateParamEquals())
62628
def render(template, context=None, **kwargs):
    
    renderer = Renderer()
    return renderer.render(template, context, **kwargs)