2

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
  • 2
    Did you have a look at the documentation? There is a whole section on Flask that contains very 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. Commented Apr 7, 2019 at 1:48
  • Thanks @SébastienLavoie. I was not aware of this beginner's guide. Your comment and the guide made me realize that my default actual app.py was replaced with the default app.py. If you post your comment as an answer i will gladly accept it :) Commented Apr 7, 2019 at 3:34

2 Answers 2

3

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:

Sign up to request clarification or add additional context in comments.

2 Comments

It feels like my birthday with all these resources! Thanks a bunch i will be diving into them shortly.
You're welcome! More generally, you can skim through the main help page where you will find more info to help you debug your app and tutorials explaining how to use the different features available on PythonAnywhere. It's extensive and really approachable, making it a great resource to start working on new aspects of your app when you're ready!
0

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!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.