i'm currently learning Flask templates, but i can't undestand how to pass a variable to it. Example of my Python code:
from flask import Flask app = Flask(__name__) @app.route('/') def home(): return {"message":"on"}, 200 @app.route('/user/<string:username>') def user_profile(username): return render_template('profile.html') My profile.html:
<!DOCTYPE html> <html> <head> <title>Perfil</title> </head> <body> <h1>User: (username)</h1> </body> </html>