NameError: name 'request' is not defined

后端 未结 3 598
無奈伤痛
無奈伤痛 2020-12-29 01:02

I got this Python Code, and somehow I get the Error Message:

File \"/app/identidock.py\", line 13, in mainpage
if request.method == \'POST\':
N         


        
3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-29 01:41

    You appear to have forgotten to import the flask.request request context object:

    from flask import request
    

提交回复
热议问题