annotate fabfile.py @ 165:1f55bb14833d

Fix mailing list link in admin. For Django 1.7 upgrade.
author Brian Neal <bgneal@gmail.com>
date Thu, 02 Apr 2015 20:12:12 -0500
parents 55ceb9824443
children 8a93b1f838f9
rev   line source
bgneal@58 1 from fabric.api import cd, run
bgneal@58 2
bgneal@99 3 PYTHON = '/svr/django-sites/madeira/bin/python'
bgneal@99 4 WC_DIR = '/svr/django-sites/madeira/madeira'
bgneal@74 5 PROJ_DIR = WC_DIR
bgneal@58 6
bgneal@58 7 def update():
bgneal@58 8 """
bgneal@58 9 Runs hg pull --update to pull changes and update to them.
bgneal@58 10
bgneal@58 11 """
bgneal@58 12 with cd(PROJ_DIR):
bgneal@58 13 run('hg pull --update')
bgneal@58 14
bgneal@58 15
bgneal@58 16 def collectstatic():
bgneal@58 17 """
bgneal@58 18 Runs the staticfiles collectstatic command to deploy static assets.
bgneal@58 19
bgneal@58 20 """
bgneal@58 21 cmd = ('%s manage.py collectstatic '
bgneal@74 22 '--settings=madeira.settings.production --noinput') % PYTHON
bgneal@58 23
bgneal@58 24 with cd(PROJ_DIR):
bgneal@58 25 run(cmd)
bgneal@58 26
bgneal@58 27
bgneal@58 28 def cleanup():
bgneal@58 29 """
bgneal@58 30 Runs the cleanup management command.
bgneal@58 31
bgneal@58 32 """
bgneal@74 33 cmd = '%s manage.py cleanup --settings=madeira.settings.production' % PYTHON
bgneal@58 34
bgneal@58 35 with cd(PROJ_DIR):
bgneal@58 36 run(cmd)
bgneal@58 37
bgneal@58 38
bgneal@58 39 def touch():
bgneal@58 40 """
bgneal@58 41 Touches the wsgi file to reload the Python code.
bgneal@58 42
bgneal@58 43 """
bgneal@58 44 with cd(PROJ_DIR):
bgneal@77 45 run('touch madeira/apache/madeira.wsgi')