[Solved] Flask App will not load app.py (The file/path provided (app) does not appear to exist)


You haven’t got anything in your template called blogposts. You need to use keyword arguments to pass the data:

return render_template('index.html', blogposts=blogposts)

Also note you should really do that query inside the function, otherwise it will only ever execute on process start and you’ll always have the same three posts.

4

solved Flask App will not load app.py (The file/path provided (app) does not appear to exist)