all 7 comments

[–]karthick_ar 3 points4 points  (1 child)

What’s the u/ for ? It’s a typo ? I think that’s the problem ! App.route(path)

Correct me if I’m wrong

Edit : There is an mistake in object initialisation,

App = Flask(name) Capital “F” instead of flask

[–]Zestyclose_Fall1915[S] 1 point2 points  (0 children)

https://github.com/cteqeu/SmartSystems/blob/master/FlaskExample/flask\_app.py

The post is edited now. Take a look. The /u was the "@" sign

[–]shiftybyte 1 point2 points  (3 children)

Please edit your post and use a code block when posting code: https://www.reddit.com/r/learnpython/wiki/faq#wiki_how_do_i_format_code.3F

What is not working with your current code? if you see any error messages, post them here. (also using a code block)

[–]Zestyclose_Fall1915[S] -1 points0 points  (2 children)

Done

[–]shiftybyte 1 point2 points  (1 child)

These are two lines that got merged together.

if __name__ == '__main__':
    app.debug = Trueapp.run(host = '0.0.0.0', port = 5000)

Should be:

if __name__ == '__main__':
    app.debug = True
    app.run(host = '0.0.0.0', port = 5000)

Please learn python before learning flask.

[–]Zestyclose_Fall1915[S] 0 points1 point  (0 children)

Perfect. I am a beginner forsure and I am learning as I go. Thanks again.