def generate_resource(cls, post, resource): import models if not post: post = models.BlogPost.get_by_id(resource) else: assert resource == post.key().id() template_vals = { 'post': post, 'rendered_body': markup.render_body(post), } rendered = utils.render_template("post.html", template_vals) static.set(post.path, rendered, config.html_mime_type)
def rendered(self): # Returns the rendered body. return markup.render_body(self)
def rendered(self): """Returns the rendered body.""" return markup.render_body(self)