Flask App Will Not Load App.py (the File/path Provided (app) Does Not Appear To Exist)
My flask app is outputting 'no content' for the for() block and i dont know why. I tested my query in app.py , here is app.py: # mysql config app.config['MYSQL_DATABASE_USER'] = 'u
Solution 1:
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.
Post a Comment for "Flask App Will Not Load App.py (the File/path Provided (app) Does Not Appear To Exist)"