Home

Published

- 1 min read

flask define template folder

img of flask define template folder

The solution for this is noted below

flask define template folder

Solution

   import os
from flask import Flask

template_dir = os.path.abspath('../../frontend/src')
app = Flask(__name__, template_folder=template_dir)

Try other methods by searching on the site. That is if this doesn’t work