comparison 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
comparison
equal deleted inserted replaced
38:6b4e02b8be6b 39:b9d6f6d930a9
1 from fabric.api import cd, env, local, put, run
2
3
4 def update():
5 """
6 Runs hg pull -u.
7
8 """
9 with cd('/home/var/django-sites/bns/bns/'):
10 run('hg pull -u')
11
12
13 def collectstatic():
14 """
15 Runs the staticfiles collectstatic command to deploy static assets.
16
17 """
18 cmd = ('. ./env.bash && python manage.py collectstatic '
19 '--settings=settings.production --noinput')
20
21 with cd('/home/var/django-sites/bns/bns/bns_website/'):
22 run(cmd)
23
24
25 def touch():
26 """
27 Touches the wsgi file to reload the Python code.
28
29 """
30 with cd('/home/var/django-sites/bns/bns/bns_website/'):
31 run('touch apache/bns.wsgi')