Renders the Post as HTML using the template specified in :attr:`html_template_path`.

        :param all_posts: An optional :class:`PostCollection` containing all of the posts in the site.
        :return: The rendered HTML as a string.
978307
def render_item(self, all_posts):
        
        index = all_posts.index(self)
        if index > 0:  # has newer posts
            newer_post = all_posts[index - 1]
        else:
            newer_post = None

        if index < len(all_posts) - 1:  # has older posts
            older_post = all_posts[index + 1]
        else:
            older_post = None
        return settings.JINJA_ENV.get_template(self.template).render(
            post=self,
            newer_post=newer_post,
            older_post=older_post,
            all_posts=all_posts,
            nav_context='post'
        )
1372084
def render_template_string(self, plain, rich = None, **context):
        ''''''
        self.plain = render_template_string(plain, **context)
        if rich is not None:
            self.rich = render_template_string(rich, **context)
91563
def render(options)
      options = options_for_render(options)
      links = links_for_render(options)

      LinkCollection.new(context, links, options)
    end
193051
def to_html(self):
        
        if self.items is None:
            return
        else:
            html = '<ol%s>\n' % self.html_attributes()
            for item in self.items:
                html += '<li>%s</li>\n' % item.to_html()
            html += '</ol>'
            return html
1281625
def render_publ_template(template, **kwargs):
    
    text = render_template(
        template.filename,
        template=template,
        image=image_function(
            template=template,
            category=kwargs.get('category'),
            entry=kwargs.get('entry')),
        **kwargs
    )

    return text, caching.get_etag(text)
325660
def render(self):
        
        html = ''
        href = self.view if self.view is not None else self.href
        
        attrs = copy(self.attrs)
        if self.submodal:
            attrs['role'] = "button"
            attrs['data-toggle'] = "remote-submodal"
            if self.data_target:
                if isinstance(self.data_target, basestring):
                    attrs['data-target'] = self.data_target
                else:
                    attrs['data-target'] = "#submodal"
        elif self.modal:
            attrs['role'] = "button"
            #attrs['data-dismiss'] = "modal"
            attrs['data-toggle'] = "modal"
            #attrs['data-submodal'] = "true"
            #attrs['data-remoteinbody'] = "false"
            if self.data_target:
                if isinstance(self.data_target, basestring):
                    attrs['data-target'] = self.data_target
                else:
                    attrs['data-target'] = "#modal"
            
        if self.data_tip:
            attrs['data-tip'] = self.data_tip
        if self.target:
            attrs['target'] = self.target
        if 'css_class' not in attrs:
            attrs['css_class'] = ''
        attrs['css_class'] += ' btn ' + " ".join(self.css)
        attrs = ' '.join(['%s="%s"' % (key if key != 'css_class' else 'class', value) for key,value in attrs.iteritems()])
        
        if href:
            if self.view:
                href = reverse(self.view, args=self.view_args, kwargs=self.view_kwargs)
            if self.next:
                href += '?next=%s' % (self.next if self.next.startswith('/') else reverse(self.next))
            html += '<a href="%s" %s>' % (href, attrs)
        else:
            html += '<button type="button" %s>' % (attrs,)
        
        if hasattr(self.inner, 'render'):
            html += self.inner.render()
        else:
            html += self.inner
        
        if self.title:
            html += self.title
        
        if href:
            html += "</a>"
        else:
            html += "</button>"
        
        return html
130879
def compile(self):
        
        self.content = "".join(map(lambda x: x.compile(), self.children))
        return self._generate_html()
1018132
def render(self, context):
        
        try:
            args, ctx = self.get_resolved_arguments(context)
            target = args[0]
            if not target:
                return ''
            ctx['content'] = target
        except VariableDoesNotExist:
            return ''

        emitter = context.get('emitter')
        t_name = emitter.get_template_path(target)
        t = get_template(t_name)
        context.dicts.append(ctx)
        response = t.nodelist.render(context)
        context.pop()
        return response
633758
def render_post_field(post_field, key_parent = 'fields')
      # define key
      key = "#{key_parent}[#{post_field.id}]"
      # render correct field
      case post_field.typology
      when 'text'
        render_post_field_text(post_field, key)
      when 'textarea'
        render_post_field_textarea(post_field, key)
      when 'datetime'
        render_post_field_datetime(post_field, key)
      when 'editor'
        render_post_field_editor(post_field, key)
      when 'geolocalization'
        render_post_field_geolocalization(post_field, key)
      when 'image'
        render_post_field_image(post_field, key)
      when 'gallery'
        render_post_field_gallery(post_field, key)
      when 'youtube'
        render_post_field_youtube(post_field, key)
      when 'composed'
        render_post_field_composed(post_field, key)
      when 'relay'
        render_post_field_relay(post_field, key)
      end
    end
1256727
def _collection_html_response(resources, start=0, stop=20):
    
    return make_response(render_template(
        'collection.html',
        resources=resources[start:stop]))
597088
def render_text(self, request, instance, context):
        
        render_template = self.get_render_template(request, instance, email_format='text')
        if not render_template:
            # If there is no TEXT variation, create it by removing the HTML tags.
            base_url = request.build_absolute_uri('/')
            html = self.render_html(request, instance, context)
            return html_to_text(html, base_url)

        instance_context = self.get_context(request, instance, email_format='text', parent_context=context)
        instance_context['email_format'] = 'text'

        text = self.render_to_string(request, render_template, instance_context)
        text = text + ""  # Avoid being a safestring
        if self.render_replace_context_fields:
            text = replace_fields(text, instance_context, autoescape=False)
        return text
11403
def to_html_(self) -> str:
        
        try:
            renderer = pytablewriter.HtmlTableWriter
            data = self._build_export(renderer)
            return data
        except Exception as e:
            self.err(e, "Can not convert data to html")
534838
def render(self, template_name, __data=None, **kw):
        ''''''
        return self.template.render(template_name,
                                    **self._vars(__data, **kw))
307282
def render_page(path):
    
    try:
        page = Page.get_by_url(request.path)
    except NoResultFound:
        abort(404)

    return render_template(
        [page.template_name, current_app.config['PAGES_DEFAULT_TEMPLATE']],
        page=page)
1315369
def to_html(self):
        
        row = '<tr%s>\n' % self.html_attributes()
        for cell in self.cells:
            row += cell.to_html()
        row += '</tr>\n'

        return row
53370
def render(self, *args, **kwargs):
        '''
        
        '''
        user_name = kwargs.get('user_name', args[0])
        kind = kwargs.get('kind', args[1])
        num = kwargs.get('num', args[2] if len(args) > 2 else 6)
        with_tag = kwargs.get('with_tag', False)
        glyph = kwargs.get('glyph', '')

        all_cats = MUsage.query_most(user_name, kind, num).objects()
        kwd = {
            'with_tag': with_tag,
            'router': router_post[kind],
            'glyph': glyph
        }
        return self.render_string('modules/info/list_user_equation.html',
                                  recs=all_cats,
                                  kwd=kwd)
314630
def render(request, template_name, context=None, content_type=None, status=None, using=None, logs=None):
    
    if logs:
        obj_logger = ObjectLogger()
        if not isinstance(logs, list):
            logs = [logs, ]
        for log in logs:
            log = obj_logger.log_response(
                log,
                context,
                status=str(status),
                headers='',
                content_type=str(content_type))
            log.save()
    return django_render(
        request,
        template_name,
        context=context,
        content_type=content_type,
        status=status,
        using=using)