Mercurial > public > madeira
comparison fabfile.py @ 74:49f704e58400
Update fabfile for Django 1.4 changes.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 14 Jul 2012 13:55:25 -0500 |
parents | db9c66873680 |
children | d2e32fa2dc99 |
comparison
equal
deleted
inserted
replaced
73:dc3b4368fb4e | 74:49f704e58400 |
---|---|
1 from fabric.api import cd, run | 1 from fabric.api import cd, run |
2 | 2 |
3 PYTHON = '/home/var/django-sites/virtualenvs/madeira/bin/python' | 3 PYTHON = '/home/var/django-sites/virtualenvs/madeira/bin/python' |
4 WC_DIR = '/home/var/django-sites/virtualenvs/madeira/madeira' | 4 WC_DIR = '/home/var/django-sites/virtualenvs/madeira/madeira' |
5 PROJ_DIR = WC_DIR + '/madeira' | 5 PROJ_DIR = WC_DIR |
6 | 6 |
7 def update(): | 7 def update(): |
8 """ | 8 """ |
9 Runs hg pull --update to pull changes and update to them. | 9 Runs hg pull --update to pull changes and update to them. |
10 | 10 |
17 """ | 17 """ |
18 Runs the staticfiles collectstatic command to deploy static assets. | 18 Runs the staticfiles collectstatic command to deploy static assets. |
19 | 19 |
20 """ | 20 """ |
21 cmd = ('%s manage.py collectstatic ' | 21 cmd = ('%s manage.py collectstatic ' |
22 '--settings=settings.production --noinput') % PYTHON | 22 '--settings=madeira.settings.production --noinput') % PYTHON |
23 | 23 |
24 with cd(PROJ_DIR): | 24 with cd(PROJ_DIR): |
25 run(cmd) | 25 run(cmd) |
26 | 26 |
27 | 27 |
28 def cleanup(): | 28 def cleanup(): |
29 """ | 29 """ |
30 Runs the cleanup management command. | 30 Runs the cleanup management command. |
31 | 31 |
32 """ | 32 """ |
33 cmd = '%s manage.py cleanup --settings=settings.production' % PYTHON | 33 cmd = '%s manage.py cleanup --settings=madeira.settings.production' % PYTHON |
34 | 34 |
35 with cd(PROJ_DIR): | 35 with cd(PROJ_DIR): |
36 run(cmd) | 36 run(cmd) |
37 | 37 |
38 | 38 |