Python Flask problem
If you go to
/login, it gives an error. Why is it? It says that it has something to do with what it returns, but i still don't get the error. Thanks!
Can you let me know what the error is? Also, you left a method called
post, but you haven't written anything inside it, making line 62:
app.run('0.0.0.0') have an error called
Indentation Error. If you want to work on that later, just make the code inside the repl
pass, so the Python will just ignore it.
@isaiah08 So, I found the problem! I forked your repl, so you can see that. First thing, the last return render template needs to be at second indentation level, meaning 4 spaces away from the most left of the line. Second thing, you don't actually have a .env file, meaning you have no
SECRET_KEY. Just create a file called
.env in the root (meaning not inside any dirs),and add a line of code that looks like this
SECRET_KEY = ''. You must fill in the quotation marks with a string. NOTE: Anyone with this key has ROOT authority over your website.