Пример #1
0
 def process_request(self, request):
     if not request.user.is_authenticated():
         return
     onlinestatus = cache.get(CACHE_PREFIX_USER % request.user.pk)
     if not onlinestatus:
         onlinestatus = OnlineStatus(request)
     refresh_user(request)
     refresh_users_list(updated=onlinestatus)
     return
Пример #2
0
 def process_request(self, request):
     if not request.user.is_authenticated():
         return
     onlinestatus = cache.get(CACHE_PREFIX_USER % request.user.pk)
     if not onlinestatus:
         onlinestatus = OnlineStatus(request)
     refresh_user(request)
     refresh_users_list(updated=onlinestatus)
     return
Пример #3
0
 def process_request(self, request):
     if request.user.is_authenticated():
         onlinestatus = cache.get(CACHE_PREFIX_USER % request.user.pk)
     elif not ONLY_LOGGED_USERS:
         onlinestatus = cache.get(CACHE_PREFIX_ANONYM_USER % request.session.session_key)
     else :
         return
     if not onlinestatus:
         onlinestatus = OnlineStatus(request)
     refresh_user(request)
     refresh_users_list(request, updated=onlinestatus)
     return
Пример #4
0
 def process_request(self, request):
     if request.user.is_authenticated():
         onlinestatus = cache.get(CACHE_PREFIX_USER % request.user.pk)
     elif not ONLY_LOGGED_USERS:
         onlinestatus = cache.get(CACHE_PREFIX_ANONYM_USER %
                                  request.session.session_key)
     else:
         return
     if not onlinestatus:
         onlinestatus = OnlineStatus(request)
     refresh_user(request)
     refresh_users_list(request, updated=onlinestatus)
     return