[damned-lies] Updated compile-trans command for recent Django



commit c7f5f22cdf0394f0539ea10f43d7d33d3f7a4174
Author: Claude Paroz <claude 2xlibre net>
Date:   Sun Sep 13 21:39:47 2015 +0200

    Updated compile-trans command for recent Django

 stats/management/commands/compile-trans.py |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/stats/management/commands/compile-trans.py b/stats/management/commands/compile-trans.py
index 44daa5d..e496663 100644
--- a/stats/management/commands/compile-trans.py
+++ b/stats/management/commands/compile-trans.py
@@ -1,12 +1,13 @@
 # -*- coding: utf-8 -*-
-from django.core.management.base import NoArgsCommand
-from django.core.management.commands import compilemessages
 import os
 import shutil
 
-class Command(NoArgsCommand):
+from django.core.management import call_command
+from django.core.management.base import BaseCommand
+
+
+class Command(BaseCommand):
     help = "Compile translations of djamnedlies"
-    args = ""
 
     output_transaction = False
 
@@ -23,4 +24,4 @@ class Command(NoArgsCommand):
             shutil.copy(os.path.join(podir, pofile), os.path.join(localedir, 'django.po'))
 
         # Run compilemessages -l ll
-        compilemessages.compile_messages(self.stderr)
+        call_command('compilemessages')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]