在pycharm用flask显示页面,结果报错
访问首页正常显示helloworld,访问其他页面就报错
另外,pycharm里有警告WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
from flask import Flask
from flask import request
from flask import render_template
app = Flask(__name__)
@app.route('/')
def hello_world(): # put application's code here
return 'Hello World!'
@app.route('/abc',methods = ['POST'])
def hello_world1(): # put application's code here
return """
<form>
账号:<input><br>
密码:<input>
</form>"""
# @app.route('/tem')
# def hello_world3(): # put application's code here
# return render_template("index.html")
if __name__ == '__main__':
app.run()
网上的方法基本都试过了,重新安装了apache,在.htaccess和httpd.conf中写了相应代码,还是报一样的错