from flask import Flask
from flask import request
from flask import render_template
app = Flask(__name__)
@app.route("/route", methods=["GET", "POST"])
def board_write():
if request.method == "POST":
name=request.form.get("name")
title = request.form.get("title")
contents = request.form.get("contents")
else:
return render_template("write.html")
if __name__ == "__main__":
app.run(host="0.0.0.0", debug=True, post=9000)
* Serving Flask app 'run' (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: on
Traceback (most recent call last): File "C:\python\myweb\run.py", line 19, in <module> app.run(host="0.0.0.0", debug=True, post=9000) File "C:\python\myweb\venv\lib\site-packages\flask\app.py", line 922, in run run_simple(t.cast(str, host), port, self, **options) TypeError: run_simple() got an unexpected keyword argument 'post'
문제 되는 922 줄 코드
try:
run_simple(t.cast(str, host), port, self, **options)
finally:
# reset the first request information if the development server
# reset normally. This makes it possible to restart the server
# without reloader and that stuff from an interactive shell.
self._got_first_request = False
이런식으로 되어있더라구여