From: Guillaume Pellerin Date: Tue, 22 Jul 2014 23:31:11 +0000 (+0200) Subject: fix locale X-Git-Tag: 1.1~349 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=a10e9b46f6c8d91278e717db024c234d8f0123e1;p=teleforma.git fix locale --- diff --git a/teleforma/management/commands/teleforma-exam-message-bug.py b/teleforma/management/commands/teleforma-exam-message-bug.py index 1143c048..c906caba 100644 --- a/teleforma/management/commands/teleforma-exam-message-bug.py +++ b/teleforma/management/commands/teleforma-exam-message-bug.py @@ -4,14 +4,14 @@ from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User from django.template.defaultfilters import slugify +from django.utils import translation +from django.conf import settings from telemeta.models import * from telemeta.util.unaccent import unaccent from teleforma.exam.models import * import logging import codecs import time, os -from django.utils import translation -from django.conf import settings class Command(BaseCommand): diff --git a/teleforma/management/commands/teleforma-exam-submit-scripts.py b/teleforma/management/commands/teleforma-exam-submit-scripts.py index 47d610fd..69942cb4 100644 --- a/teleforma/management/commands/teleforma-exam-submit-scripts.py +++ b/teleforma/management/commands/teleforma-exam-submit-scripts.py @@ -4,6 +4,8 @@ from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User from django.template.defaultfilters import slugify +from django.utils import translation +from django.conf import settings from telemeta.models import * from telemeta.util.unaccent import unaccent from teleforma.exam.models import * @@ -29,6 +31,7 @@ class Command(BaseCommand): args = "log_file" def handle(self, *args, **options): + translation.activate(settings.LANGUAGE_CODE) logger = Logger(args[0]) for script in Script.objects.filter(status=2): logger.logger.info(script.title)