Home
Head's Up: I'm in the middle of upgrading my site. Most things are in place, but there are something missing and/or broken including image alt text. Please bear with me while I'm getting things fixed.

Render A Template String In Python's flask Web Server

python
#!/usr/bin/env python3

from flask import Flask
from flask import render_template_string

app = Flask(__name__)

@app.route('/')
def index():
    return render_template_string("""
<!DOCTYPE html>
<html><head><title>CSS Test</title></head>
<body>Example output: {{ the_text }}</body>
</html>""",
                                  the_text="alfa")


app.run(port=8100, host='0.0.0.0')