For this route:
@app.route("/<string:c_id>/br")
def br(c_id):
mydb = mysql.connector.connect(...)
mycursor = mydb.cursor()
mycursor.execute("USE ...)
mycursor.execute("SELECT * FROM Bank;")
BR = mycursor.fetchone()
BR = BR[1]
mydb.close()
return render_template('twelve.html',BR=BR,c_id=c_id)
BR is a string, written in HTML, e.g. BR = r'<h1>To sort </h1> <i>to be completed</i>' Which is part of a database. Fetching BR from the database gives: <h1>To sort </h1> <i>to be completed</i>
I would like to include this into my template - twelve.html
twelve.html:
{% extends "layout.html" %}
{% block title %}This Page{% endblock %}
{% block head %}
{{ super() }}
<style type="text/css">
.important { color: #336699; }
</style>
{% endblock %}
{% block content %}
<h2>This Page</h2>
{{ BR }}
{% endblock %}
Currently the webpage reads,<h1>To sort </h1> <i>to be completed</i>
How do I get it to read the HTML tags, and use them? So it actually looks something like this: