Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Getting started with Flask ... can't get past first base
-
I've been learning Python for a while now (after a break from programming of several decades) but have concentrated on console work. Thought it was time to do some web stuff and decided to give Flask a go.
I note that it is installed as standard in Pythonista. I assumed I just entered the basic hello world code.
from flask import Flask app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello, World!'
and whilst I get no errors when I execute the above, nor do I get anything else. Is a flask server running in the background? Do I need to open a web browser with a particular url. I was anticipating 127.0.0.1:8080 as a guess but there is nothing there.
Please point me in the right direction.
-
app.run(debug=False)
-
Brilliant. Thank you. Worked fine. Now to work.
Is that normally required, or specific to Pythonista? I don't recall seeing it in basic introductions for Flask.
-
@gruntfutuk, yes, you need to run the server, regardless of the platform.
-
This post is deleted!