2016-06-28 22:28:59 +00:00
|
|
|
"""Clean deleted sessions management command"""
|
2015-06-12 16:10:52 +00:00
|
|
|
from django.core.management.base import BaseCommand
|
2015-06-11 21:04:26 +00:00
|
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
|
|
|
|
from ... import models
|
|
|
|
|
2015-06-12 16:10:52 +00:00
|
|
|
|
2015-06-11 21:04:26 +00:00
|
|
|
class Command(BaseCommand):
|
2016-06-28 22:28:59 +00:00
|
|
|
"""Clean deleted sessions"""
|
2015-06-11 21:04:26 +00:00
|
|
|
args = ''
|
|
|
|
help = _(u"Clean deleted sessions")
|
|
|
|
|
|
|
|
def handle(self, *args, **options):
|
|
|
|
models.User.clean_deleted_sessions()
|