Ask coding questions

← Back to all posts
Flask not working
isaiah08 (63)

OK, I'm making this big flask blogging application, but line 10 generates an error. What is wrong with it?

Answered by Coder100 (17117) [earned 5 cycles]
View Answer
Coder100 (17117)


You must put this inside an @app.route function, because remember, a session requires a user, and a user requires a url!


put it in every @app.route function, like this one:

def home():
	return render_template("index.html")
isaiah08 (63)

One more question:
If you go to, enter some information, and click done, it gives an error. What is wrong? @Coder100

Coder100 (17117)

@isaiah08 you forgot to set a return value for when the user isn't logged in


I think that error means your proram took longer to run. it should not take that long, and line 10 is generating the long time thing.