Last active
August 29, 2015 14:25
-
-
Save nitely/72ffb09eb03dc3f76826 to your computer and use it in GitHub Desktop.
Django build .mo files for every app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if __name__ == '__main__': | |
import os | |
from subprocess import call | |
BASE = os.getcwd() | |
for root, dirs, files in os.walk("./spirit"): | |
if 'locale' not in dirs: | |
continue | |
os.chdir(root) | |
call(["django-admin", "compilemessages", ]) | |
os.chdir(BASE) | |
print("ok") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment