how to access form data of a POST request with flask

Solution
@app.route('/edit_img', methods=["POST"])
def edit_img():
    img_id = request.form.get('id')
    ### YOUR CODE
    return render_template(# the page and data your rendering)