I need help with this flask

This code should work but it doesn’t. basically what it is is some code that should be displaying index.html which is in the templates folder all on main.py. here’s the link https://replit.com/@OwenStritz/flask?v=1#main.py, all i need is an explanation why it doesn’t work and how to fix it.

I’m no flask expert, but maybe you need to specify the port?

port=81?, oh that line is a comment

he’s probably saying: app.run("")

1 Like

either way that part is still a comment

1 Like

Yeah, they’re saying to uncomment that line and replace app.run(debug=True) with it.

none of the code down there seems to be the error though

I forked your Repl and switched those lines. Guess what? It worked, lol. Next time, you can use the official Flask template.

im trying to use render_template so my code looks cleaner instead of having the html in the .py, i already knew how to do that.

1 Like