From: Aleksander Ɓukasz Date: Thu, 4 Jul 2013 08:12:41 +0000 (+0200) Subject: pre_collectstatic hook X-Git-Tag: 0.1.7~1 X-Git-Url: https://git.mdrn.pl/fnpdjango.git/commitdiff_plain/e72e716a3a7088b07e5b2f3af87fe5a18adfbb64 pre_collectstatic hook --- diff --git a/fnpdjango/deploy/__init__.py b/fnpdjango/deploy/__init__.py index 6edaebc..f47790d 100644 --- a/fnpdjango/deploy/__init__.py +++ b/fnpdjango/deploy/__init__.py @@ -73,6 +73,7 @@ def deploy(): install_requirements() symlink_current_release() migrate() + pre_collectstatic() collectstatic() restart() @@ -237,6 +238,11 @@ def migrate(): run('%(app_path)s/ve/bin/python manage.py syncdb --noinput' % env, pty=True) run('%(app_path)s/ve/bin/python manage.py migrate' % env, pty=True) +def pre_collectstatic(): + print '>>> pre_collectstatic' + for task in env.get('pre_collectstatic', []): + execute(task) + def collectstatic(): """Collect static files""" print '>>> collectstatic'