python – jinja2.exceptions.TemplateNotFound error
python – jinja2.exceptions.TemplateNotFound error
You put your template in the wrong place. From the Flask docs:
Flask will look for templates in the templates folder. So if your application is a module, this folder is next to that module, if it’s a package it’s actually inside your package:
See the docs for more information: http://flask.pocoo.org/docs/quickstart/#rendering-templates
I think you shouldnt prepend themesDir
. You only pass the filename of the template to flask, it will then look in a folder called templates
relative to your python file.
python – jinja2.exceptions.TemplateNotFound error
Related posts on python :
- python – How to fix IndexError: invalid index to scalar variable
- python – Import GoogleNews-vectors-negative300.bin
- python – Object does not support item assignment error
- python – ImportError: cannot import name np_utils
- python – TypeError: argument of type float is not iterable
- python import – ImportError: No module named packaging.version
- python – Resize PyTorch Tensor
- how can I load svg file into my python flask page?
- python – ImportError: No module named model_selection
- bash – Fast ping sweep in python