Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
Tags
- nextJS
- 3-Way HandShake
- webp
- 인증서
- TLS
- 렌더링 과정
- 이미지 최적화
- 브라우저
- 이미지 포맷 변경
- 리버스 프록시
- pm2
- 무중단
- SSL
- certbot
- aws
- ec2
- SSH
- gitgub actions
- 로드 밸런싱
- DNS
- https
- nginx
- workflow
- 자동화
- 이미지 압축
- 검색엔진최적화
- CI
- 배포
- tcp
- 성능 개선
Archives
- Today
- Total
개발일기
팀원소개 프로젝트(3) 본문
다른 팀원이 맡았던 데이터 삭제 부분을 해보려고 했다.
코드를 짜기 전에 먼저 머리로 생각해 봤는데 먼가 될거 같았다.
막상 해보니까 역시 안된다.
막 해보던 중에 다른 팀원이 성공했다.
코드는 이렇다.
app.py
@app.route("/intro/delete", methods=["DELETE"])
def delete_intro():
delete_name = request.form.get('delete_name')
db.intro.delete_one({'name':delete_name})
return jsonify({'msg':'삭제 완료!'})
index.html
function delete_card() {
$(".deletebtn").on("click", function () {
let name = $(this).closest(".card").find(".card-title").text();
let d_formData = new FormData();
d_formData.append("delete_name", name);
// console.log(name);
fetch("/intro/delete", { method: "DELETE", body: d_formData })
.then((res) => res.json())
.then((data) => {
alert(data["msg"]);
window.location.reload();
});
});
}
이런 코드를 어떻게 짜시는 건지 대단하다.
먼가,,, 빨리 수업이 시작 되었으면 좋겠다.
코드를 작성하지는 못하겠지만 이해만 해보려고 한다.
화이팅,,,
'TIL' 카테고리의 다른 글
Javascript 문법 배우기(1) (0) | 2023.05.22 |
---|---|
팀원소개 프로젝트 마무리 (0) | 2023.05.19 |
팀원소개 프로젝트(4) (0) | 2023.05.18 |
팀원소개 프로젝트(2) (0) | 2023.05.17 |
팀원 소개 프로젝트(1) (0) | 2023.05.15 |