Skip to content

Instantly share code, notes, and snippets.

@nitely
Last active August 29, 2015 14:25
Show Gist options
  • Save nitely/72ffb09eb03dc3f76826 to your computer and use it in GitHub Desktop.
Save nitely/72ffb09eb03dc3f76826 to your computer and use it in GitHub Desktop.
Django build .mo files for every app
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