From 8c32aa5dedbfdee7af4b764e38be8c19a45aa2a2 Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Thu, 28 Jan 2016 17:46:48 +0100 Subject: [PATCH] compile messages via fabric --- fabfile.py | 10 +++++++++- requirements/requirements-dev.txt | 2 -- requirements/requirements.txt | 2 ++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/fabfile.py b/fabfile.py index 5473b6dd4..bd685c652 100644 --- a/fabfile.py +++ b/fabfile.py @@ -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'), diff --git a/requirements/requirements-dev.txt b/requirements/requirements-dev.txt index edda2cdcd..68d4d1e6e 100644 --- a/requirements/requirements-dev.txt +++ b/requirements/requirements-dev.txt @@ -1,8 +1,6 @@ -i https://py.mdrn.pl:8443/simple/ django-debug-toolbar -polib -django-babel Fabric sphinx pyinotify diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 75310d000..3f035607d 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -14,6 +14,8 @@ django-modeltranslation>=0.10,<0.11 django-allauth>=0.24,<0.25 django-extensions +polib +django-babel pytz -- 2.20.1