from django.core.management import BaseCommand from django.db import transaction from django.db.models import Count from boards.models import Thread __author__ = 'neko259' class Command(BaseCommand): help = 'Archive old threads' @transaction.atomic def handle(self, *args, **options): Thread.objects.process_old_threads()