I am trying to host a Flask web app on python anywhere but I cannot get the website to render. When I visit the link, all I get is a web page saying Hello from Flask!. My error log does not show any message. I am lost and don't know what to do. I made a simple test Flask app in the same directory to test whether it was the domain host, or an import issue, but the test app worked fine. Any help would be appreciated.
2 Answers
In PythonAnywhere's documentation, there is a whole section on Flask that contains detailed information on how to deploy your website, including a beginner's guide. The message Hello from Flask! actually shows that your app is indeed running correctly, this is the default app behavior.
Once you get your app going, you may also be interested in the following resources in the help pages to supplement your learning:
2 Comments
In the file section of your site there is something flask_app be sure to delete that and replace by your own files. and also goto web and scroll down a bit and there is WSGI configuration file: get in by clicking the link and there is flask_app, replace that by your module name, save and reload the code! That is it,it will work now!
Hello from Flask!actually shows that your app is indeed running correctly, this is the default app behavior.