From: Jan Szejko Date: Thu, 28 Jan 2016 16:46:48 +0000 (+0100) Subject: compile messages via fabric X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/8c32aa5dedbfdee7af4b764e38be8c19a45aa2a2?ds=sidebyside;hp=-c compile messages via fabric --- 8c32aa5dedbfdee7af4b764e38be8c19a45aa2a2 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