DEV Community

Discussion on: Learn Flask by coding

Collapse
 
sm0ke profile image
Sm0ke

Hello Eric,
Thanks :)

The print should be inside the hello() method.
Did you clone the app from Github?

Collapse
 
pwarde profile image
Erik

Hi,

No, I just read your article and typed the few lines of code myself.
So only the first example:

from flask import Flask
app = Flask(__name__)

@app.route('/')
    return 'Hello Coder, you are up!'

Gives a syntax error and should be:

from flask import Flask
app = Flask(__name__)

@app.route('/')
def hello():
    return 'Hello Coder, you are up!'

That is all. But might be important for a #beginners post.

Thread Thread
 
sm0ke profile image
Sm0ke

Done. Thank you!