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 방식으로 구현하였다.