Skip to content Skip to sidebar Skip to footer

Deploying Flask App To Heroku - Template Not Found

I'm developing my first app with Flask and deploying to Heroku. Below is the error message I get locally and on Heroku. Also can be seen here: http://warm-beyond-4111.herokuapp.com

Solution 1:

Try creating the templates folder at the root of the application /templates and see if that fixes the problem. I think you can set the templates folder in Flask, just can't find it now.

Also, you might like the github repo on flask deployment on Heroku. https://github.com/zachwill/flask_heroku

Also checkout this SO Post on folder structure - flask blueprint template folder You may want to use Flask Blueprints, if you prefer to keep templates under helloflask.

I don't use Flask on Heroku, so have not verified this setup. Hope this helps.

Solution 2:

The templates folder should be a part of the package as your app. Move it into /helloflask/helloflask.

See #2 from http://flask.pocoo.org/docs/quickstart/#a-minimal-application.

Post a Comment for "Deploying Flask App To Heroku - Template Not Found"