I am trying to render the file indexpy.html. The file exists in my project and in its folder, but I keep getting jinja2.exceptions.TemplateNotFound: home.html when I try to render it. Why can't Flask find my template?
from flask import Flask, redirect, url_for, render_template
app = Flask(__name__)
@app.route("/")
def home():
return render_template("indexpy.html")
@app.route("/<name>")
def user(name):
return f"Hello {name}!"
@app.route("/admin")
def admin():
return redirect(url_for("home"))
if __name__ == "__main__":
app.run()enter code here