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' %}