diff fabfile.py @ 39:b9d6f6d930a9

Merged Chris and Brian's changes with mine.
author Bob Mourlam <bob.mourlam@gmail.com>
date Sun, 06 Nov 2011 20:28:25 -0600
parents 1eb4b4072888
children 89d0511cb5c2
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fabfile.py	Sun Nov 06 20:28:25 2011 -0600
@@ -0,0 +1,31 @@
+from fabric.api import cd, env, local, put, run
+
+
+def update():
+    """
+    Runs hg pull -u.
+
+    """
+    with cd('/home/var/django-sites/bns/bns/'):
+        run('hg pull -u')
+
+
+def collectstatic():
+    """
+    Runs the staticfiles collectstatic command to deploy static assets.
+
+    """
+    cmd = ('. ./env.bash && python manage.py collectstatic '
+        '--settings=settings.production --noinput')
+
+    with cd('/home/var/django-sites/bns/bns/bns_website/'):
+        run(cmd)
+
+
+def touch():
+    """
+    Touches the wsgi file to reload the Python code.
+
+    """
+    with cd('/home/var/django-sites/bns/bns/bns_website/'):
+        run('touch apache/bns.wsgi')