comparison fabfile.py @ 602:35f0904d4bd5

Update the collectstatic command for Django 1.4 directory layout.
author Brian Neal <bgneal@gmail.com>
date Sun, 22 Jul 2012 12:25:27 -0500
parents 76ec83b73e18
children a7968613c469
comparison
equal deleted inserted replaced
601:af403a9f4fb7 602:35f0904d4bd5
1 from fabric.api import cd, run 1 from fabric.api import cd, run
2 2
3 PYTHON = '/home/var/django-sites/virtualenvs/sg101/bin/python' 3 PYTHON = '/home/var/django-sites/virtualenvs/sg101/bin/python'
4 WC_DIR = '/home/var/django-sites/virtualenvs/sg101/sg101' 4 PROJ_DIR = '/home/var/django-sites/virtualenvs/sg101/sg101'
5 PROJ_DIR = WC_DIR + '/sg101'
6 5
7 def update(): 6 def update():
8 """ 7 """
9 Runs hg pull --update to pull changes and update to them. 8 Runs hg pull --update to pull changes and update to them.
10 9
17 """ 16 """
18 Runs the staticfiles collectstatic command to deploy static assets. 17 Runs the staticfiles collectstatic command to deploy static assets.
19 18
20 """ 19 """
21 cmd = ('%s manage.py collectstatic ' 20 cmd = ('%s manage.py collectstatic '
22 '--settings=settings.production --noinput') % PYTHON 21 '--settings=sg101.settings.production --noinput') % PYTHON
23 22
24 with cd(PROJ_DIR): 23 with cd(PROJ_DIR):
25 run(cmd) 24 run(cmd)
26 25
27 26