Mercurial > public > madeira
view fabfile.py @ 177:8003888ba3b2
Update requirements for Django 1.7.10.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 20 Aug 2015 19:51:06 -0500 |
parents | 8a93b1f838f9 |
children |
line wrap: on
line source
from fabric.api import cd, run PYTHON = '/svr/django-sites/madeira/bin/python' WC_DIR = '/svr/django-sites/madeira/madeira' PROJ_DIR = WC_DIR def update(): """ Runs hg pull --update to pull changes and update to them. """ with cd(PROJ_DIR): run('hg pull --update') def collectstatic(): """ Runs the staticfiles collectstatic command to deploy static assets. """ cmd = ('%s manage.py collectstatic ' '--settings=madeira.settings.production --noinput') % PYTHON with cd(PROJ_DIR): run(cmd) def cleanup(): """ Runs any/all cleanup-type management commands. """ cmd = '%s manage.py clearsessions --settings=madeira.settings.production' % PYTHON with cd(PROJ_DIR): run(cmd) def touch(): """ Touches the wsgi file to reload the Python code. """ with cd(PROJ_DIR): run('touch madeira/apache/madeira.wsgi')