본문 바로가기

분류 전체보기127

4-11 [스파르타피디아] - 뼈대 준비하기 app.py 코드 from flask import Flask, render_template, request, jsonify app = Flask(__name__) @app.route('/') def home(): return render_template('index.html') @app.route("/movie", methods=["POST"]) def movie_post(): sample_receive = request.form['sample_give'] print(sample_receive) return jsonify({'msg':'POST 연결 완료!'}) @app.route("/movie", methods=["GET"]) def movie_get(): return jsonify({'msg':'GE.. 2022. 5. 21.
코딩과 프로그래밍의 차이 코딩 소스코드를 작성하는 행위 프로그래밍 어떤 문제를 분석하고, 논리적으로 해결할 수 있는 방법을 찾아 코딩하는 과정 2022. 5. 21.
HTML 내부요소 변경 _ getElementById document.getElementById('바꾸고싶은 요소id 값').innerHTML = '대신할 요소' 웹문서 ID~~인 HTML 요소를 가져와라 내부글자 예) Hello 👉 innerHTML 대신 바꾸고 싶은 대상을 써도 됨 예) document.getElementById('바꾸고싶은 요소id 값').style.color = 'red' >>글씨가 빨간색으로 바뀜 바꾸고 싶은대상의 코드는 구글검색하는것 추천 JS how to change margin 등등...... 2022. 5. 20.
pymongo코드_insert / find / update / delete 기본코드 from pymongo import MongoClient client = MongoClient('여기에 URL 입력') db = client.dbsparta 코드요약정리 *아래 코드에서 users 는 선택한 파일 이름 # 저장 - 예시 doc = {'name':'bobby','age':21} db.users.insert_one(doc) # 한 개 찾기 - 예시 user = db.users.find_one({'name':'bobby'}) # 여러개 찾기 - 예시 ( _id 값은 제외하고 출력) same_ages = list(db.users.find({'age':21},{'_id':False})) # 바꾸기 - 예시 db.users.update_one({'name':'bobby'},{'$set':{.. 2022. 5. 20.