コード例 #1
0
 def process_request(self, request):
     """
     Set the thread's pinning flag according to the presence of the session
     variable.
     """
     pinned_until = request.session.get(PINNING_KEY, False)
     if pinned_until and pinned_until > datetime.now():
         PinningMixin.pin_thread()
コード例 #2
0
 def process_request(self, request):
     """
     Set the thread's pinning flag according to the presence of the session
     variable.
     """
     pinned_until = request.session.get(PINNING_KEY, False)
     if pinned_until and pinned_until > datetime.now():
         PinningMixin.pin_thread()
コード例 #3
0
 def process_request(self, request):
     """
     Set the thread's pinning flag according to the presence of the cookie.
     """
     if PINNING_KEY in request.COOKIES:
         PinningMixin.pin_thread()
コード例 #4
0
 def process_request(self, request):
     """
     Set the thread's pinning flag according to the presence of the cookie.
     """
     if PINNING_KEY in request.COOKIES:
         PinningMixin.pin_thread()