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

9 lines
349 B
Python
Raw Normal View History

2009-01-05 14:30:08 +02:00
#from datetime import datetime
#from django.http import HttpResponseRedirect
from django.core.cache import cache
from django.conf import settings
#from django.core.urlresolvers import reverse
class LastLoginMiddleware(object):
def process_request(self, request):
cache.set(str(request.user.id), True, settings.FORUM_USER_ONLINE_TIMEOUT)