from django.core.management.base import BaseCommand
from core import models, jobs


class Command(BaseCommand):
    help = 'Collect Texts'

    def handle(self, *args, **options):
        query = models.Text.objects.filter(is_translated=False)
        for index, text in enumerate(query):
            self.stdout.write('{}/{} {}'.format(index, query.count(), text))
            jobs.translate(text.id)
        self.stdout.write(self.style.SUCCESS('done'))

27cf09380465b92a124a7baad8bfec592a4bbafa
<mask token>

<mask token>


class Command(BaseCommand):
    <mask token>
    <mask token>

<mask token>


class Command(BaseCommand):
    <mask token>

    def handle(self, *args, **options):
        query = models.Text.objects.filter(is_translated=False)
        for index, text in enumerate(query):
            self.stdout.write('{}/{} {}'.format(index, query.count(), text))
            jobs.translate(text.id)
        self.stdout.write(self.style.SUCCESS('done'))

<mask token>


class Command(BaseCommand):
    help = 'Collect Texts'

    def handle(self, *args, **options):
        query = models.Text.objects.filter(is_translated=False)
        for index, text in enumerate(query):
            self.stdout.write('{}/{} {}'.format(index, query.count(), text))
            jobs.translate(text.id)
        self.stdout.write(self.style.SUCCESS('done'))

from django.core.management.base import BaseCommand
from core import models, jobs


class Command(BaseCommand):
    help = 'Collect Texts'

    def handle(self, *args, **options):
        query = models.Text.objects.filter(is_translated=False)
        for index, text in enumerate(query):
            self.stdout.write('{}/{} {}'.format(index, query.count(), text))
            jobs.translate(text.id)
        self.stdout.write(self.style.SUCCESS('done'))
