D
D
Denis Sh2015-10-09 14:59:54
Django
Denis Sh, 2015-10-09 14:59:54

How to accept cookies in django?

On the client side, using js, I create cookies Cookies.set("TEST", 'Values'),
then on the server side I try to pick them up, but nothing comes out, I
tried this:
a = request.COOKIES['TEST']
and so
a = request.COOKIES.get('TEST')

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
iegor, 2015-10-09
@iegor

You get the cookie correctly, but you have the wrong js code, show it or read the article on how to set cookies on js www.badscript.net/blogpost/kak-zadat-poluchit-i-ud...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question