Split the static files management into several tasks.
authorLucian Ursu <lucian.ursu@gmail.com>
Fri, 22 Feb 2013 14:35:37 +0000 (16:35 +0200)
committerLucian Ursu <lucian.ursu@gmail.com>
Fri, 22 Feb 2013 14:35:37 +0000 (16:35 +0200)
fabfile.py

index da1e5e18a8e358c11fe1572ace541acca326d6e7..672267b9520913ca9e8a9552391bbd289a722a94 100755 (executable)
@@ -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