The get parameter in flask cannot be used in psot?

:

<a href="{{ url_for("main.editrole",edit_id = roles.id )}}"></a>
:

def editrole():
    roleid = request.args.get("edit_id")
    if request.method == "POST":
        print roleid         //postroleid None
    return render_template("editrole.html")    

editrole.html page, POST is the data submitted using ajax, and roleid is None when saving the data.

how can I get the value of roleid in post?

Feb.06,2022

try request.vaules.get ('edit_id')

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3dac1-34761.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3dac1-34761.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?