본문 바로가기

분류 전체보기127

div 구조잡기_가운데 정렬 1. 구역확인 2. 구조잡기 3. 세밀하게 조정 .box { width: 1000px; display: flex; flex-direction: row; align-items: center; justify-content: center; margin: 40px auto 0px auto; } .map { width: 500px; height: 500px; background-color: red; margin-right: 30px; } .story { width: 450px; height: 500px; background-color: blue; } ▶위아래로 가운데 정렬 display: flex; flex-direction: column; align-items: center; justify-content: ce.. 2022. 5. 19.
4-6 [화성땅 공동구매] - 뼈대 준비 app.py 코드 from flask import Flask, render_template, request, jsonify app = Flask(__name__) @app.route('/') def home(): return render_template('index.html') @app.route("/mars", methods=["POST"]) def web_mars_post(): sample_receive = request.form['sample_give'] print(sample_receive) return jsonify({'msg': 'POST 연결 완료!'}) @app.route("/mars", methods=["GET"]) def web_mars_get(): return jsonify({'msg.. 2022. 5. 18.
4-5 [화성땅 공동구매]프로젝트_ 필요한 패키지? 완성작: http://spartacodingclub.shop/web/mars flask 폴더 구조 만들기: static, templates 폴더 + app.py 만들기 만들기위해 필요한 패키지 : flask, pymongo, dnspython 다운받아놓기 아 어려워 미쳐버려........ 2022. 5. 18.
4-4 (코드모음!!)Flask로 API 만들기_GET/POST 방식으로 데이터받기 API? 같은예금 창구에서도 개개인마다 처리하는 것이 다른 은행창구 같은것. 클라이언트가 서버에 요청을 할때 어떤 종류의 요청인지 정보를 알려주는것, 대표적으로 GET/POST방식이 있음!! 💡GET, POST 방식 ▶GET 통상적으로 데이터 조회(Read) 를 요청할 때 예) 영화 목록 조회 → 데이터 전달: URL 뒤에 물음표를 붙여 key=value로 전달 → 예: google.com?q=북극곰 ▶POST 통상적으로 데이터 생성(Create), 변경(Update), 삭제(Delete) 요청 할 때 예) 회원가입, 회원탈퇴, 비밀번호 수정 → 데이터 전달 :바로 보이지 않는 HTML body에 key:value 형태로 전달 GET/POST 요청에서 클라이언트의 데이터를 받는 방법 만약 클라이언트에서 .. 2022. 5. 18.