def edit(id): post = Post.findone(id=id) if post is None: flashx.error('Request post not found') abort(404) return render_template('edit.html', post=post, active_tab='eidt')