@app.route('/post/new/<string:blog_id>', methods=['GET', 'POST'])
def create_new_post(blog_id):
    if (request.method == 'GET'):
        return render_template('new_post.html', blog_id=blog_id)
    else:
        title = request.form['title']
        content = request.form['content']
        blog = Blog.from_mongo_in_blog_object(blog_id)
        blog.new_post(title, content)
        return make_response(blog_posts(blog_id))
@app.route('/post/new/<string:blog_id>', methods=['GET', 'POST'])
def create_new_post(blog_id):
    if (request.method == 'GET'):
        return render_template('new_post.html', blog_id=blog_id)
    else:
        title = request.form['title']
        content = request.form['content']
        blog = Blog.from_mongo_in_blog_object(blog_id)
        blog.new_post(title, content)
        return make_response(blog_posts(blog_id))