From d39b95e42bcd23561628c581259af1e5a5280c06 Mon Sep 17 00:00:00 2001 From: Lucian Ursu Date: Fri, 22 Feb 2013 16:35:37 +0200 Subject: [PATCH] Split the static files management into several tasks. --- fabfile.py | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/fabfile.py b/fabfile.py index da1e5e1..672267b 100755 --- a/fabfile.py +++ b/fabfile.py @@ -78,9 +78,32 @@ def syncdb(): ########## FILE MANAGEMENT @task -def collectstatic(): +def manage_static(): + collect_static() + compress_static() + upload_static() + + +@task +def collect_static(): """Collect all static files, and copy them to S3 for production usage.""" env.run('python manage.py collectstatic --noinput') + + +@task +def compress_static(): + """ + Compresses the static files. + """ + pass + + +@task +def upload_static(): + """ + Uploads the static files to the specified host. + """ + pass ########## END FILE MANAGEMENT -- 2.25.1