bgneal@33: from fabric.api import cd, env, local, put, run bgneal@33: bgneal@33: bgneal@33: def up(): bgneal@33: """ bgneal@33: Runs hg up. bgneal@33: bgneal@33: """ bgneal@33: with cd('/home/var/django-sites/bns/bns/'): bgneal@33: run('hg up') bgneal@33: bgneal@33: bgneal@33: def collectstatic(): bgneal@33: """ bgneal@33: Runs the staticfiles collectstatic command to deploy static assets. bgneal@33: bgneal@33: """ bgneal@33: cmd = ('. ./env.bash && python manage.py collectstatic ' bgneal@33: '--settings=settings.production --noinput') bgneal@33: bgneal@33: with cd('/home/var/django-sites/bns/bns/bns_website/'): bgneal@33: run(cmd) bgneal@33: bgneal@33: bgneal@33: def touch(): bgneal@33: """ bgneal@33: Touches the wsgi file to reload the Python code. bgneal@33: bgneal@33: """ bgneal@33: with cd('/home/var/django-sites/bns/bns/bns_website/'): bgneal@33: run('touch apache/bns.wsgi')