전체 글381 222-풀링 백준 222-풀링 문제 링크https://www.acmicpc.net/problem/17829 2025. 7. 29. Tailwind Play Tailwind 미리보기 링크 Tailwind PlayAn advanced online playground for Tailwind CSS that lets you use all of Tailwind's build-time features directly in the browser.play.tailwindcss.com 2025. 7. 25. Throttling 적용하기 UserRateThrottle(인증된 유저에 대한), AnonRateThrottle(익명 사용자에 대한), ScopedRateThrottle(해당 ID나 IP에 대한) 또는 커스텀하여 적용할 수 있습니다. Throttling을 적용하고자 하는 앱에 다음과 같이 초당 1회(테스트)로 제한하도록 설정한 후에 카테고리 목록을 가져오는 뷰셋에 추가해주었습니다.# throttling.pyfrom rest_framework.throttling import AnonRateThrottle, UserRateThrottleclass MOUThrottle(UserRateThrottle): rate = "1/s"class MOUAnonThrottle(AnonRateThrottle): rate = "1/s" from.. 2025. 7. 21. django-debug-toolbar 안 보이는 문제 해결 SQL 디버깅을 위해 django-debug-toolbar를 설치한 후에도 화면에서 툴바가 보이지 않는 문제가 있었다.print(request.META['REMOTE_ADDR']) 확인을 위해 위의 코드를 뷰에 추가하고 서버를 실행했더니 아래와 같이 출력되었다. 로컬 서버를 도커로 띄워서 사용 중이라 "localhost", "127.0.0.1"을 추가하는 것으로는 해결되지 않았던 것이다. 그래서 INTERNAL_IPS에 "172.18.0.1"을 다음과 같이 추가한 후 재시작하니 툴바가 정상적으로 출력되었다.# settings/dev.pyfrom .base import *DEBUG = TrueALLOWED_HOSTS = ["*"]INSTALLED_APPS += [ "debug_toolbar",]MID.. 2025. 7. 17. N+1 문제 해결 MOU 목록을 조회하는 API를 개발하던 중에 Django Debug Toolbar를 통해 쿼리 로그를 확인해보니 심상치 않은 패턴이 보이기 시작했습니다. 메인 쿼리가 2개의 MOU 객체를 가져왔는데, 이와 관련된 ForeignKey 및 ManyToManyField 필드들을 가져오기 위해 각각의 MOU 객체에 대해 추가적인 쿼리들이 다음과 같이 반복적으로 발생하였습니다.DEBUG (0.001) SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."la.. 2025. 7. 17. 도커 배포 관련 자료 [AWS] Docker(nginx + django + postgres)Play Data Final Project AWS 실습velog.io 2025. 7. 6. 이전 1 2 3 4 5 6 ··· 64 다음