Contents

Views 1822 Comment 0
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print

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



?

List of Articles
No. Category Subject Author Date Views
969 System/OS [web] 웹서비스 취약점 자료.. (논문첨부) file hooni 2003.04.23 18057
968 PPT [doc] 인공지능 관련 자료(채팅로봇도 포함..) file hooni 2013.04.23 18040
967 System/OS [linux] 리눅스,유닉스 /proc/stat 파일 보는 법 hooni 2013.04.23 18013
966 System/OS [linux] 커널 컴파일, 설정 hooni 2003.04.23 17911
965 System/OS [windows] 도스 사용 팁 hooni 2003.04.23 17894
964 Develop [c#] 정규표현식을 이용한 문자열에서 태그 제거함수 file hooni 2013.04.23 17875
963 Develop [ios] 자주 쓰는 패턴과 API hooni 2013.04.23 17730
962 Develop [ios] Debug Extensions (from 종길 차장님 ㅋㅋ) file hooni 2013.04.23 17729
961 System/OS 네트워크별 MTU(최대 전송 단위) hooni 2013.04.23 17708
960 System/OS 무선 인증 서버.. 김도.. ㅋㅋ file hooni 2013.04.23 17684
959 Etc GSM에서 음성이 실리는 과정 요약.. hooni 2013.04.23 17584
958 System/OS [switch] 시스코 카탈리스트(Cisco Catalyst) 기본 설정 hooni 2013.04.23 17569
Board Pagination Prev 1 ... 13 14 15 16 17 18 19 20 21 22 ... 98 Next
/ 98