def post(postid): posts = PostRepo() post = posts.getById(postid) if post == None: return abort(404) else: return render_template("view.html", post = post)