Contents

조회 수 3713 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

Python Django, view의 response 에서 cookie 세팅

template의 request에서 cookie 읽기


In your views:

def process_response(self, request, response):
response.set_cookie('changed', 'yes')
response.set_cookie('choose', request.LANGUAGE_CODE)
return response

And in your template:

{{ request.COOKIES.cookie_name }}


And using if-statements in your template:

{% if request.COOKIES.cookie_name == 'name' %}



?

  1. 알고리즘 성능분석

  2. [c#]뉴 툴바 개인적으로 만든거.. (old)

  3. [ios] How To Use UIScrollView to Scroll and Zoom Content (Using Objective-C)

  4. [ios] 커스텀 폰트 사용하기 (Custom Fonts)

  5. [ios] Xcode에서 특정 파일만 ARC 따로 설정하는 방법

  6. [ios] iOS 사운드 관련 프레임워크

  7. [io] Apple Watch, Today Extension 앱ID 설정

  8. [js] Array.splice() 설명

  9. [vim] vim 명령으로  문자 제거하기 (remove 65279 bomb)

  10. [ios] Swift 4 Dictionary 사용하기

  11. [android] 안드로이드 앱 문서 샘플

  12. [ios] 여러 버전의 Xcode 사용하기

Board Pagination Prev 1 ... 55 56 57 58 59 60 61 62 63 64 ... 71 Next
/ 71