Set with a random value
def in_some_function(request):response = HttpResponse('blah')rand = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(N))response.set_cookie('user_cookie', rand)
Use value as a sub-folder name
def in_some_function(request):if 'user_cookie' in request.COOKIES:value = request.COOKIES['user_cookie']
edit: Upon looking on our code - will be implemented with creating
rand = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(N))
and "bubbling" it through the entire process.
Set with a random value
def in_some_function(request):
response = HttpResponse('blah')
rand = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(N))
response.set_cookie('user_cookie', rand)
Use value as a sub-folder name
def in_some_function(request):
if 'user_cookie' in request.COOKIES:
value = request.COOKIES['user_cookie']
edit: Upon looking on our code - will be implemented with creating
rand = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(N))
and "bubbling" it through the entire process.