Use call_command to compile translations

This commit is contained in:
Benjamin Dauvergne 2014-09-03 09:09:19 +02:00
parent 0ec6419d8f
commit 9ad80a9972
1 changed files with 2 additions and 4 deletions

View File

@ -21,15 +21,13 @@ class compile_translations(Command):
def run(self):
import os
import sys
from django.core.management.commands.compilemessages import \
compile_messages
from django.core.management import call_command
for path in ['mellon/']:
if path.endswith('.py'):
continue
curdir = os.getcwd()
os.chdir(os.path.realpath(path))
compile_messages(sys.stderr)
call_command('compilemessages')
os.chdir(curdir)
class build(_build):