- count
- Queue
- update
- ORM
- SQL
- 트리
- Django
- DB
- create
- migrations
- drf
- 스택
- 통계학
- stack
- M:N
- distinct
- 그리디
- 쟝고
- N:1
- 큐
- outer join
- Article & User
- 백트래킹
- regexp
- Tree
- delete
- 이진트리
- Vue
- 완전검색
- 뷰
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
목록Put (2)
데이터 분석 기술 블로그
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/clCKu9/btsHzrHko8n/khdC7qf9ksHx10XnTiTKQK/img.png)
DELETE & PUT단일 댓글 삭제 및 수정을 위한 view 함수 작성# articles/views.py@api_view(['GET', 'DELETE', 'PUT'])def comment_detail(request, comment_pk): comment = Comment.objects.get(pk=comment_pk) if request.method == 'GET': serializer = CommentSerializer(comment) return Response(serializer.data) elif request.method == 'DELETE': comment.delete() return Response(status..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/Xxdvx/btsHv9n2wNX/TKuBhrUa3HUVJ9RuPxjXQK/img.png)
1. DELETE게시글 데이터 삭제하기요청에 대한 데이터 삭제가 성공했을 경우는 204 No Content 응답# articles/views.py@api_view(['GET', 'DELETE'])def article_detail(request, article_pk): article = Article.objects.get(pk=article_pk) if request.method == 'GET': serializer = ArticleSerializer(article) return Response(serializer.data) elif request.method == 'DELETE': article.delete() return ..