check_descriptions.py 432 Bytes
from django.core.management.base import BaseCommand

from syntax.models import NaturalLanguageDescription

class Command(BaseCommand):
    args = 'none'
    help = ''

    def handle(self, **options):
        phrs = sorted(nld.phrase_str for nld in NaturalLanguageDescription.objects.filter(description='???'))
        with open('phrase_desc_problems.txt', 'w') as f:
            for phr in phrs:
                print(phr, file=f)