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
2009-01-17 17:56:19 +02:00

7 lines
No EOL
244 B
Python

from django.core.cache import cache
from apps.forum import settings as forum_settings
class LastLoginMiddleware(object):
def process_request(self, request):
cache.set(str(request.user.id), True, forum_settings.USER_ONLINE_TIMEOUT)