from django.core.management.base import BaseCommand from ... import models [docs]class Command(BaseCommand): args = '' help = "Clean SessionTicket and ProxyGrantingTicket linked to expired sessions" [docs] def handle(self, *args, **options): models.ProxyGrantingTicket.clean_deleted_sessions() models.SessionTicket.clean_deleted_sessions()