Ticket #189 (new enhancement)

Opened 23 months ago

Clean up expired sessions

Reported by: JensDiemer Owned by:
Priority: major Milestone:
Component: other Keywords:
Cc:

Description

django doesn't clean up expired sessions. PyLucid should do this:

import datetime
from django.db import transaction
from django.contrib.sessions.models import Session

Session.objects.filter(expire_date__lt=datetime.datetime.now()).delete()
transaction.commit_unless_managed()

from:  http://code.djangoproject.com/browser/django/trunk/django/bin/daily_cleanup.py

Note: See TracTickets for help on using tickets.