From e72e716a3a7088b07e5b2f3af87fe5a18adfbb64 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Thu, 4 Jul 2013 10:12:41 +0200 Subject: [PATCH] pre_collectstatic hook --- fnpdjango/deploy/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) 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' -- 2.20.1