I converted some of my apps to application factory. After converting the apps the templates folder can't be found.
/newsite
wsgi.py
config.py
/application
__init__.py
/routes
my_routes.py
/templates
index.html
/templates
index.html
In my __init__.py
....
from .routes import my_routes
app.register_blueprint(my_routes.route_bp)
In routes/my_routes.py
route_bp = Blueprint('route_bp',__name__,template_folder='static')
@route_bp('/home',methods=['GET'])
return render_template('index.html')
Render templates fails. The app does not know where the templates for is. I added both template folders and added inth.html into both. How can I know where flask thinks the template folder is located.?
I have printed current_app.templates_folder
it only prints templates
but how do I find the absolute path of the templates folder. So I can put my templates in the correct path. I thought the path should be in the applications folder however that doesn't seem to be correct.