By looking on the django docs. i wrote to setting.py hoping that it would
help:
{{{
SESSION_ENGINE = 'django.contrib.sessions.backends.signed_cookies'
SESSION_COOKIE_HTTPONLY = True
}}}
but still sessionid in cookies doesn't occur.
I read post that sessionid should be generated by django while there is
request which require sessionid, and it would be in my situation solution
on this problem but in the context_processors.py I wrote that i require
sessionid globally:
{{{
def basket(request):
try:
customer = request.user.customer
except:
device = request.COOKIES['sessionid']
customer, created = Customer.objects.get_or_create(device=device)
order, created = Order.objects.get_or_create(
customer=customer, complete=False)
return {
'order': order,
}
}}}
And beacouse of the context_processors sends request for sessionid and it
can't get one, this error occurs:
https://i.stack.imgur.com/D3d9U.png
--
Ticket URL: <https://code.djangoproject.com/ticket/32952>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
Ticket URL: <https://code.djangoproject.com/ticket/32952#comment:1>
* status: new => closed
* resolution: => invalid
Comment:
Please don't use Trac as a support channel. Closing per
TicketClosingReasons/UseSupportChannels.
--
Ticket URL: <https://code.djangoproject.com/ticket/32952#comment:2>