def test():
mysql_result = False
# TODO REMOVE FOLLOWING LINE AFTER TESTING COMPLETE.
db.session.query("1").from_statement("SELECT 1").all()
try:
if db.session.query("1").from_statement("SELECT 1").all():
mysql_result = True
except:
pass
if mysql_result:
result = Markup('<span style="color: green;">PASS</span>')
else:
result = Markup('<span style="color: red;">FAIL</span>')
# Return the page with the result.
return render_template('index.html', result=result)
评论列表
文章目录