IT/파이썬 2023. 4. 26.
Django - response 객체에 쿼리스트링 추가
response 보낼때 쿼리 스트링 붙여서 보내고 싶다면, 아래 코드를 참고하세요. response = redirect("order_view", pk=order.id) response["Location"] += "?" + request.POST.get("querystring") return response Location 이라는 필드가 있는 지 어케 아는지? 이렇게 작성을 해도 되고, from django.http import HttpResponse def my_view(request): # Get the query string from the request query_string = request.GET.get("querystring") # Create the URL with the query stri..
IT/파이썬 2023. 4. 26.
장고 로그 - Nginx 웹서버, Gunicorn, Django
완전 공부용으로 아래 링크에서 글 저장 http://oniondev.egloos.com/v/10048149 양파개발자 SW의 블로그입니다^^ : nginx-gunicorn-django 구조 파악 및 로그 확인법 아래와 같은 구조로 되어있는 Request Handling Process 를 단계별로 한번 살펴보고 이해해 봅시다!!! 그리고!!! 각 단계별로 로그는 어떻게 보는지 살펴봅시다. 유저 Request → Nginx → Gunicorn → Django Ngin oniondev.egloos.com 유저 Request → Nginx → Gunicorn → Django Nginx Reverse Proxy Server 역할 로드 밸런싱 : traffic 분산 서비스 속도 개선: in-bound, out-bo..