def render(self): """ Renders the post using object data. """ self._render_text = self.content.replace('\n', '<br>') return myHelper.jinja_render_str('post.html', p=self)
def render_str(self, template, **params): """ This methods renders html using template. """ params['user'] = self.user return myHelper.jinja_render_str(template, **params)
def render(self, current_user_id): key = db.Key.from_path('User', int(self.user_id), parent=users_key()) user = db.get(key) self._render_text = self.content.replace('\n', '<br>') return myHelper.jinja_render_str("post.html", p=self, current_user_id=current_user_id, author=user.name)
def render(self): """ Renders the post using object data. """ self._render_text = self.content.replace('\n', '<br>') return myHelper.jinja_render_str("post.html", p=self)
def render_str(self, template, **params): params['user'] = self.user return myHelper.jinja_render_str(template, **params)