Answers for "how to retrieve self.request.session outside a class"

0

how to retrieve self.request.session outside a class

>>> s.session_data
'KGRwMQpTJ19hdXRoX3VzZXJfaWQnCnAyCkkxCnMuMTExY2ZjODI2Yj...'
>>> s.get_decoded()
{'user_id': 42}
Posted by: Guest on April-10-2021
0

how to retrieve self.request.session outside a class

>>> from django.contrib.sessions.models import Session
>>> s = Session.objects.get(pk='2b1189a188b44ad18c35e113ac6ceead')
>>> s.expire_date
datetime.datetime(2005, 8, 20, 13, 35, 12)
Posted by: Guest on April-10-2021

Code answers related to "how to retrieve self.request.session outside a class"

Browse Popular Code Answers by Language