I want to create a HTTP link from db info. such as ip and port number, somehow i tried this but keep getting a error cant parse and port hope any one can help me out
@app.route('/link_test/<string:id>')
@is_logged_in
def link_test(id):
#Create cursor
cur = mysql.get_db().cursor()
#get item by itemno
result = cur.execute("SELECT * FROM testlist WHERE id = %s", [id])
doc = cur.fetchone()
)
doc = {"id": test[0], "rdno": test[1], "ipno": test[2], "port": test[3]}
cur.close()
ipno = test['ipno']
port = test['port']
url_uptime = 'https://<string:ipno>:<string:port>/stats/uptime/'
return render_template('link_test.html', uptime=json.loads(r_uptime))
)character, andtest;is never defined. And you're not parsing anything. Looks like you're trying to format a URL