개발일기

장고 조회수 기능 구현하기 본문

Project Portfolio

장고 조회수 기능 구현하기

츄98 2023. 5. 9. 21:50

https://vanillacreamdonut.tistory.com/125

 

[django] 조회수 기능 구현

models.py hits = models.PositiveIntegerField(default=1, verbose_name='조회수') views.py def detail(request, id): detail_data = get_object_or_404(Book, pk = id) comments = Comment.objects.filter(book_id=id, comment_id__isnull=True) re_comments = [] for c

vanillacreamdonut.tistory.com

https://korinkorin.tistory.com/40

 

2021.01.15_django hitcount 조회수

2021.01.15_django hitcount 조회수_정리노트 ㅎㅇㅎㅇ ㄹㅇ 오랜만.... 개인프로젝트를 2020년 안에 하려고 하다가..학교..랑 미루기..절구절구..완성하고 우다다다 적으려다 Js 가 아직 너무 기초도 없고

korinkorin.tistory.com

 

 

위 블로그 내용을 참고하여 조회수 기능을 구현하였다.

pip install django hit-count 방식으로 구현하였다.

'Project Portfolio' 카테고리의 다른 글

[JS] 달력 만들기  (0) 2023.05.26
장고 DRF 검색기능과 페이지네이션  (0) 2023.05.10
이름 미정 새로운 프로젝트~  (2) 2023.05.08
검색기능 구현하기  (0) 2023.04.15
페이징(pagination) 구현하기  (0) 2023.04.14