annotate fabfile.py @ 79:548b9e61bd64

Updated bands.json to include "asset_prefix" tags for all the bands. Incorporated all the small images from Ferenc into the bands slideshow. Went through and crushed all the large images to fit within 800x600. Make sure to "manage.py loaddata bands.json" after picking this up.
author Chris Ridgway <ckridgway@gmail.com>
date Fri, 25 Nov 2011 16:54:59 -0600
parents 1eb4b4072888
children 89d0511cb5c2
rev   line source
bgneal@33 1 from fabric.api import cd, env, local, put, run
bgneal@33 2
bgneal@33 3
bgneal@36 4 def update():
bgneal@33 5 """
bgneal@36 6 Runs hg pull -u.
bgneal@33 7
bgneal@33 8 """
bgneal@33 9 with cd('/home/var/django-sites/bns/bns/'):
bgneal@36 10 run('hg pull -u')
bgneal@33 11
bgneal@33 12
bgneal@33 13 def collectstatic():
bgneal@33 14 """
bgneal@33 15 Runs the staticfiles collectstatic command to deploy static assets.
bgneal@33 16
bgneal@33 17 """
bgneal@33 18 cmd = ('. ./env.bash && python manage.py collectstatic '
bgneal@33 19 '--settings=settings.production --noinput')
bgneal@33 20
bgneal@33 21 with cd('/home/var/django-sites/bns/bns/bns_website/'):
bgneal@33 22 run(cmd)
bgneal@33 23
bgneal@33 24
bgneal@33 25 def touch():
bgneal@33 26 """
bgneal@33 27 Touches the wsgi file to reload the Python code.
bgneal@33 28
bgneal@33 29 """
bgneal@33 30 with cd('/home/var/django-sites/bns/bns/bns_website/'):
bgneal@33 31 run('touch apache/bns.wsgi')