Get the content as if it had been rendered by the default
        non-documenting renderer.
966673
def get_content(self, renderer, data,
                    accepted_media_type, renderer_context):
        
        if not renderer:
            return '[No renderers were found]'

        renderer_context['indent'] = 4
        content = renderer.render(data, accepted_media_type, renderer_context)

        render_style = getattr(renderer, 'render_style', 'text')
        assert render_style in ['text', 'binary'], 'Expected .render_style ' \
            '"text" or "binary", but got "%s"' % render_style
        if render_style == 'binary':
            return '[%d bytes of binary content]' % len(content)

        return content
802681
def _render(self, content, **settings):
        
        result = self._render_content(content, **settings)

        s = self._es_margin(settings)
        result = self.fmt_margin(result, **s)

        return result
584767
def _render_content(self, content, **settings):
        
        if isinstance(content, dict):
            return self._render_content_dict(content, 0, [], **settings)
        elif isinstance(content, list):
            return self._render_content_list(content, 0, [], **settings)
        else:
            raise Exception("Received invalid data tree for rendering.")
645051
def render(self, *args, **kwargs):
        """"""
        if not self.childs and "href" in self.attrs:
            return self.clone()(self.attrs["href"]).render(*args, **kwargs)
        return super().render(*args, **kwargs)
90772
def _render(self, context):
        "  "
        if self.template_name:
            t = loader.get_template(self.template_name)
        else:
            t_list = self._get_template_list()
            t = loader.select_template(t_list)

        context.update(self.get_context())
        resp = t.render(context)
        context.pop()
        return resp
1322796
def render(self):
        """"""
        return FRAME_HTML % {
            'id': self.id,
            'filename': escape(self.filename),
            'lineno': self.lineno,
            'function_name': escape(self.function_name),
            'current_line': escape(self.current_line.strip())
        }
311276
def render(self, *args, **kwargs):
        """"""
        # args kwargs API provided for last minute content injection
        # self._reverse_mro_func('pre_render')
        pretty = kwargs.pop("pretty", False)
        if pretty and self._stable != "pretty":
            self._stable = False

        for arg in args:
            self._stable = False
            if isinstance(arg, dict):
                self.inject(arg)
        if kwargs:
            self._stable = False
            self.inject(kwargs)

        # If the tag or his contents are not changed and we already have rendered it
        # with the same attrs we skip all the work
        if self._stable and self._render:
            return self._render

        pretty_pre = pretty_inner = ""
        if pretty:
            pretty_pre = "\n" + ("\t" * self._depth) if pretty else ""
            pretty_inner = "\n" + ("\t" * self._depth) if len(self.childs) > 1 else ""
        inner = self.render_childs(pretty) if not self._void else ""

        # We declare the tag is stable and have an official render:
        tag_data = (
            pretty_pre,
            self._get__tag(),
            self.render_attrs(),
            inner,
            pretty_inner,
            self._get__tag()
        )[: 6 - [0, 3][self._void]]
        self._render = self._template % tag_data
        self._stable = "pretty" if pretty else True
        return self._render
631651
def render_source(self):
        """"""
        return SOURCE_TABLE_HTML % text_('\n'.join(line.render() for line in
            self.get_annotated_lines()))
1059340
def render(self, data, accepted_media_type=None, renderer_context=None):
        
        if data is None:
            return bytes()

        renderer_context = renderer_context or {}
        indent = self.get_indent(accepted_media_type, renderer_context)

        if indent is None:
            separators = SHORT_SEPARATORS if self.compact else LONG_SEPARATORS
        else:
            separators = INDENT_SEPARATORS

        ret = json.dumps(
            data, cls=self.encoder_class,
            indent=indent, ensure_ascii=self.ensure_ascii,
            separators=separators
        )

        # On python 2.x json.dumps() returns bytestrings if ensure_ascii=True,
        # but if ensure_ascii=False, the return type is underspecified,
        # and may (or may not) be unicode.
        # On python 3.x json.dumps() returns unicode strings.
        if isinstance(ret, six.text_type):
            # We always fully escape \u2028 and \u2029 to ensure we output JSON
            # that is a strict javascript subset. If bytes were returned
            # by json.dumps() then we don't have these characters in any case.
            # See: http://timelessrepo.com/json-isnt-a-javascript-subset
            ret = ret.replace('\u2028', '\\u2028').replace('\u2029', '\\u2029')
            return bytes(ret.encode('utf-8'))
        return ret
1220787
def render(self, name, value, attrs=None, renderer=None):
        """"""
        location = getattr(value, '_seralized_location', '')
        if location and not hasattr(value, 'url'):
            value.url = '#'
            if hasattr(self, 'get_template_substitution_values'):
                # Django 1.8-1.10
                self.template_with_initial = (
                    '%(initial_text)s: %(initial)s %(clear_template)s'
                    '<br />%(input_text)s: %(input)s')
        attrs = attrs or {}
        attrs.update({'data-upload-url': self.url})
        hidden_name = self.get_hidden_name(name)
        kwargs = {}
        if django_version >= (1, 11):
            kwargs['renderer'] = renderer

        parent = super(StickyUploadWidget, self).render(name, value, attrs=attrs, **kwargs)
        hidden = forms.HiddenInput().render(hidden_name, location, **kwargs)

        return mark_safe(parent + '\n' + hidden)
166641
def render(self, parsed, page=False, minify=False):
        
        # Create a random ID prefix to make sure parses don't receive the
        # same ID, even if they're identical
        id_prefix = uuid.uuid4().hex
        rendered = []
        for i, p in enumerate(parsed):
            if i == 0:
                settings = p.get("settings", {})
                self.direction = settings.get("direction", DEFAULT_DIR)
                self.lang = settings.get("lang", DEFAULT_LANG)
            render_id = "{}-{}".format(id_prefix, i)
            svg = self.render_svg(render_id, p["words"], p["arcs"])
            rendered.append(svg)
        if page:
            content = "".join([TPL_FIGURE.format(content=svg) for svg in rendered])
            markup = TPL_PAGE.format(
                content=content, lang=self.lang, dir=self.direction
            )
        else:
            markup = "".join(rendered)
        if minify:
            return minify_html(markup)
        return markup
787433
def render(obj):
    """"""
    def get_v(v):
        return v % env if isinstance(v, basestring) else v

    if isinstance(obj, types.StringType):
        return obj % env
    elif isinstance(obj, types.TupleType) or isinstance(obj, types.ListType):
        rv = []
        for v in obj:
            rv.append(get_v(v))
    elif isinstance(obj, types.DictType):
        rv = {}
        for k, v in obj.items():
            rv[k] = get_v(v)

    return rv
979362
def render(self, db, safe_mode=False, extra_context=None):
        """"""
        return self.renderer.render(
            self.context,
            db,
            safe_mode=safe_mode,
            extra_context=extra_context
        )
559815
private int renderStructured() {
        if(LOGGER.isDebugEnabled() && _padContext != null)
            LOGGER.debug("\ncurrentIndex: " + _currentIndex + "\n" +
                    "checkMaxRepeat: " + _padContext.checkMaxRepeat(_currentIndex) + "\n" +
                    "checkMinRepeat: " + _padContext.checkMinRepeat(_currentIndex) + "\n");

        if(_renderState == INIT) {
            _renderState = HEADER;
            return EVAL_BODY_AGAIN;
        }

        if(_renderState == HEADER) {
            assert _renderedItems == 0;

            /* this would only happen if Pad.maxRepeat == 0 */
            if(_padContext != null && _padContext.checkMaxRepeat(_renderedItems)) {
                _renderState = FOOTER;
                return EVAL_BODY_AGAIN;
            }

            if(_currentItem == null && _ignoreNulls) {
                advanceToNonNullItem();

                /* no non-null item was found; render the footer */
                if(_currentItem == null) {
                    doPadding();
                    // render the header
                    _renderState = FOOTER;
                }
                /* non-null item found; it's not the 0th item; render it */
                else _renderState = ITEM;
            }
            /* 0th item is non-null; render it */
            else _renderState = ITEM;

            return EVAL_BODY_AGAIN;
        }

        if(_renderState == ITEM) {
            _renderedItems++;

            /* check that the maximum number of items to render has *not* been reached */
                if(_iterator.hasNext() && (_padContext == null || (_padContext != null && !_padContext.checkMaxRepeat(_renderedItems)))) {
                _currentIndex++;
                _currentItem = _iterator.next();

                if(_ignoreNulls && _currentItem == null) {
                    advanceToNonNullItem();

                    /* last item */
                    if(_currentItem == null) {
                        doPadding();

                        /* render the header */
                        _renderState = FOOTER;
                        return EVAL_BODY_AGAIN;
                    }
                }

                /* if _ignoreNulls is false, the _currentItem may be null here */
                return EVAL_BODY_AGAIN;
            }
            /*
             have finished rendering items for some reason:
              1) there isn't a next item
              2) reached the maximum number of items to render
              So:
              1) pad if necessary
              2) render the footer
             */
            else {
                doPadding();

                _renderState = FOOTER;
                return EVAL_BODY_AGAIN;
            }
        }

        if(_renderState == FOOTER) {
            _renderState = END;
            return SKIP_BODY;
        }

        return SKIP_BODY;
    }
964235
def rendered(self):
        """"""
        if not self._rendered:
            template_path = get_template_path(self.raw_template_path)
            if template_path:
                with open(template_path, 'r') as template:
                    if len(os.path.splitext(template_path)) == 2 and (
                            os.path.splitext(template_path)[1] == '.j2'):
                        self._rendered = Template(template.read()).render(
                            context=self.context,
                            mappings=self.mappings,
                            name=self.name,
                            variables=self.resolved_variables
                        )
                    else:
                        self._rendered = template.read()
            else:
                raise InvalidConfig(
                    'Could not find template %s' % self.raw_template_path
                )

        return self._rendered
604813
def render(self, parsed):
        
        self.renderer.root_node = parsed
        with self.renderer as r:
            return r.render(parsed)
735528
def render_content(content, **kwargs):
    ''''''
    # try to take pre rendered content from django cache, if caching is enabled
    if settings.ACTIVE_URL_CACHE:
        cache_key = get_cache_key(content, **kwargs)

        # get cached content from django cache backend
        from_cache = cache.get(cache_key)

        # return pre rendered content if it exist in cache
        if from_cache is not None:
            return from_cache

    # render content with "active" logic
    content = check_content(content, **kwargs)

    # write rendered content to django cache backend, if caching is enabled
    if settings.ACTIVE_URL_CACHE:
        cache.set(cache_key, content, settings.ACTIVE_URL_CACHE_TIMEOUT)

    return content