python - jinja2.exceptions.TemplateNotFound error

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  :

Leave a Reply

Your email address will not be published. Required fields are marked *