<commit_before>from django.core.management.base import BaseCommand, CommandError
from course_grader.models import SubmittedGradeRoster


class Command(BaseCommand):
    help = "Submits failed graderosters"

    def handle(self, *args, **options):
        models = SubmittedGradeRoster.objects.filter(
            accepted_date__isnull=True,
            status_code__isnull=False).order_by("submitted_date")

        for model in models:
            model.submit()<commit_msg>activate translation for management command<commit_after>from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from django.utils import translation
from course_grader.models import SubmittedGradeRoster


class Command(BaseCommand):
    help = "Submits failed graderosters"

    def handle(self, *args, **options):
        translation.activate(settings.LANGUAGE_CODE)

        models = SubmittedGradeRoster.objects.filter(
            accepted_date__isnull=True,
            status_code__isnull=False).order_by("submitted_date")

        for model in models:
            model.submit()
{'fraction_non_alphanumeric': 0.07608695652173914, 'fraction_numerical': 0.0, 'mean_word_length': 3.8253275109170306, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '252996', 'n_tokens_mistral': 302, 'n_tokens_neox': 286, 'n_words': 68}