#파이썬 #파이참 #파이썬개발 #파이참 #파이썬 게임코드 # 파이썬 가위바위보 # 가위바위보게임코드 #sqlalchemy #flask # sqlite #database #session #post #json #jsonify #context #app.config #secretkey #config
-
파이썬, flask, SQLAlchemy, SQLite, jsonify로 가위 바위 보 게임 코드 웹 페이지에 올리기Python 2024. 7. 10. 04:10
파이썬 코드, flask, SQLAlchemy를 활용하여 웹 페이지 구현 얼마 전 만든 파이썬 가위바위보 게임 코드를 flask, SQLAlchemy, html, css 등을 활용하여 웹페이지에 올려보았다.파이참의 파일 구조는 이렇다. .venvinstance├ game_history.dbstatic 파일 ├ style.csstemplates 파일├ index.htmlapp.py 난 웹페이지에 가위, 바위, 보를 이미지를 삽입해줬기 때문에 static file 안에 paper.png, rock.png, scissors.png 파일이 있다. app.py 전체 코드 from flask import Flask, render_template, request, jsonify, sessionfrom flask_..