compile messages via fabric
authorJan Szejko <j-sz@o2.pl>
Thu, 28 Jan 2016 16:46:48 +0000 (17:46 +0100)
committerJan Szejko <j-sz@o2.pl>
Thu, 28 Jan 2016 16:46:48 +0000 (17:46 +0100)
fabfile.py
requirements/requirements-dev.txt
requirements/requirements.txt

index 5473b6d..bd685c6 100644 (file)
@@ -24,12 +24,19 @@ def production():
 
 
 def update_counters():
-    print '>>> update counters'
+    print '>>> updating counters'
     require('app_path', 'project_name')
     with cd(get_django_root_path('current')):
         run('%(ve)s/bin/python manage.py update_counters' % env, pty=True)
 
 
+def compile_messages():
+    print '>>> compiling messages'
+    require('app_path', 'project_name')
+    with cd(get_django_root_path('current')):
+        run('%(ve)s/bin/python manage.py localepack -c' % env, pty=True)
+
+
 @task
 def beta():
     env.hosts = ['giewont.icm.edu.pl']
@@ -40,6 +47,7 @@ def beta():
     env.requirements_file = 'requirements/requirements.txt'
     env.pre_collectstatic = [
         update_counters,
+        compile_messages,
     ]
     env.services = [
         Supervisord('beta'),
index edda2cd..68d4d1e 100644 (file)
@@ -1,8 +1,6 @@
 -i https://py.mdrn.pl:8443/simple/
 
 django-debug-toolbar
-polib
-django-babel
 Fabric
 sphinx
 pyinotify
index 75310d0..3f03560 100644 (file)
@@ -14,6 +14,8 @@ django-modeltranslation>=0.10,<0.11
 django-allauth>=0.24,<0.25
 django-extensions
 
+polib
+django-babel
 
 pytz