开发者

Flaskr SyntaxError

开发者 https://www.devze.com 2023-02-19 16:26 出处:网络
I\'m trying out the Flaskr tutorial(http://flask.pocoo.org/docs/) and I got the following error after I tried to run flaskr.py using the terminal:

I'm trying out the Flaskr tutorial(http://flask.pocoo.org/docs/) and I got the following error after I tried to run flaskr.py using the terminal:

if __name__ == '__main__':
开发者_Python百科                             ^
SyntaxError: invalid syntax

I have absolutely no idea why I got this error. Can someone help me please?


You have forgotten a closing parenthesis in your return line, above your if __name__ == "__main__": statement, you put

return redirect(url_for('show_entries')

and it should be

return redirect(url_for('show_entries'))
0

精彩评论

暂无评论...
验证码 换一张
取 消