OK, I did it. Unfortunately, the session table is using pickled data, so the processing has to be done in django. Here it goes:
In views that you would like to refresh the active state of a user, add: request.session['last_seen']= datetime.datetime.now() Then, in a util.py : from django.contrib.sessions.models import Session from django.contrib.auth.models import User import datetime time_limit = datetime.timedelta(minutes=10) def get_active(): sessions = Session.objects.all() active = [] now = datetime.datetime.now() for s in sessions: s_dict = s.get_decoded() if 'last_seen' in s_dict: last_seen = s_dict['last_seen'] if now - last_seen < time_limit: user = User.objects.get(pk=s_dict['_auth_user_id']) active.append(user) return active Then, just create a template tag that prints out the users. Maybe this should be moved in the docs/wiki ? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---