I'm currently building a flask app and created a project structure that is really organized. I want to render a template, that is located in a subdirectory but I can't figure out why it is not finding the HTML file. I tried many different paths and tried joining the path using the OS module but I couldn't get it to work. Thanks for helping me!
my-flask-app
├── app/
│ └── website/
| |──templates/
| | └──home.html #The html file I want to render
| └──views.py #The file where the template is rendered
└── main.py
from flask import Blueprint, render_template, request, flash
import os
views = Blueprint("views", __name__)
@views.route("/", methods=["GET", "POST"])
def home():
return render_template("./website/templates/home.html")