This repository has been archived on 2025-05-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
s2forums/apps/forum/middleware.py

7 lines
244 B
Python
Raw Normal View History

2009-01-05 14:30:08 +02:00
from django.core.cache import cache
2009-01-17 17:56:19 +02:00
from apps.forum import settings as forum_settings
2009-01-05 14:30:08 +02:00
class LastLoginMiddleware(object):
def process_request(self, request):
2009-01-17 17:56:19 +02:00
cache.set(str(request.user.id), True, forum_settings.USER_ONLINE_TIMEOUT)