[Django] 비 SPA 방식으로 장고 Forms/Views를 적극 활용한 인스타그램 St 만들기#9_easy-thumbnails를 활용한 유저페이지 썸네일 처리 구현

아직·2022년 7월 15일
0
post-thumbnail

1)


def user_page(request, username):
...
    post_list.count = post.list.count()

len(post_list)는 post_list 전체를 가져와서 메모리에 얹은 다음에 메모리 상의 리스트의 갯수를 반환하는 반면, post_list.count는 db에 count query를 던지게 된다.

0개의 댓글