Simple stuff here...
if I try to reference a cookie in Django via
request.COOKIE["key"]
if the cookie doesn't exist that will throw a key error.
For Django's GET
and POST
, since they are QueryDict
objects, I can just do
if "foo" in request.GET
which is wonderfully sophisticated...
what's the closest thing to this for cookies that isn't a Try/Catch block, if anything...