Skip to content

Commit

Permalink
added makemessages script
Browse files Browse the repository at this point in the history
  • Loading branch information
ojii committed Sep 21, 2012
1 parent 35d65c5 commit 71919c6
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions makemessages.py
@@ -0,0 +1,25 @@
#!/usr/bin/env python
from cms.test_utils.cli import configure
from cms.test_utils.tmpdir import temp_dir
import os

def main():
with temp_dir() as STATIC_ROOT:
with temp_dir() as MEDIA_ROOT:
configure(
ROOT_URLCONF='cms.test_utils.project.urls',
STATIC_ROOT=STATIC_ROOT,
MEDIA_ROOT=MEDIA_ROOT,
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'cmstestdb.sqlite',
}
}
)
from django.core.management import call_command
os.chdir('cms')
call_command('makemessages', all=True)

if __name__ == '__main__':
main()

0 comments on commit 71919c6

Please sign in to comment.