inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

남박사의 파이썬으로 실전 웹사이트 만들기

게시판만들기 - 글 쓰기

게시판 만들기가 안됩니다

593

이형주

작성한 질문수 1

1

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
이런식으로 되어있더라구여

python

답변 1

0

남박사

app.run(host="0.0.0.0", debug=True, post=9000)

위에 보시면 post 가 아니라 port 로 쓰셔야.... ^^;;

iis 접속후 자동으로 로그인 창이 나오도록 설정이 기능한가요?

0

145

2

리스트 이동 시 창 에러 발생

0

134

1

배포후 회원 등록 후 로그인 에러...

0

165

2

내부 서버 오류

0

154

2

app.config["MONGO_URI"] = "mongodb://localhost:27017/pm_db"

0

106

2

DB 검색하면 데이터가 없습니다. 라고 나와요. 5시간을 찾아봐도 모르겠어서 문의드려봅니다.

0

125

1

몽고db studio3T를 깔았는데

0

129

2

flake8과 linter

0

162

3

500이 뜹니다.

0

151

2

첨부파일 삭제

0

133

2

검색기능 질문

0

159

2

google.py

0

124

2

Studio 3T에 DB insert가 되지 않는 문제를 해결하지 못하고 있습니다 ㅠ

0

172

3

혹시 전체 코드 공개되어 있나요?

0

132

1

join.html 의 form 태그값 을 member_join() 에서 처리못함.

0

165

1

google.py 몽고db 샘플데이터 만들기

0

173

2

flake8 설치 이후 명령팔레트에서 linter가 안보입니다.

0

321

2

파이썬으로 만들어서 웹호스팅에 올릴경우

0

367

1

현재 구글검색 무한스크롤변경 문의합니다

0

347

1

몽고디비아틀라스로 추가 공부해서 올립니다.

0

246

1

IIS 500.19에러

0

700

2

버전 문제도 수정했는데 결과가 안나옵니다.

0

296

1

데이터베이스 저장관련 질문입니다.

0

318

1

test가 생기지 않습니다.

0

563

3