On Wed, 2009-03-18 at 01:17 +0000, Paulo Köch wrote: [...] > Based on this, I can't see why a simple custom cron job inspecting the > pickled session data (assuming the user_id is in the session) before > purging old session would not suffice. Care to elaborate?
I think you've arrived back at the point of what Django already provides, which is why the original ticket was closed. You run "django-admin.py cleanup" in a cronjob and all the old sessions are removed. You don't need to check the user ids or anything like that. Expired sessions are expired, no matter who they belonged to. Calling logout(), as the original poster requested doesn't achieve anything (it does nothing). If it did do something, it would still be a bad idea to call it, because the user could have already logged in again and logging them out would be unfortunate. So, yes, the cronjob is the solution. Which is why it's been in Django for the last four years. :-) Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---