@app.route("/CreateAScheme",methods=['GET','POST'])
def CreateAScheme():
if request.method == 'POST':
userDetails = request.form
Scheme = userDetails['Scheme']
con = MySQL.connection.cursor()
con.execute("CREATE TABLE %s (id int NOT NULL AUTO_INCREMENT, Course varchar(255) NOT NULL, Year varchar(255), PRIMARY KEY(id));",(Scheme))
MySQL.connection.commit()
con.close()
flash("Succesfully Created")
return "Succesfully"
return render_template('index.html')
我收到一个错误“并非所有参数都在字符串格式化期间转换”