annotate fabfile.py @ 91:c15b50f1ebfc

For Django 1.5: Don't include old photologue URLs. They still use the old function style generic views, which are missing from Django 1.5. Since I don't use these URLs, and at some point they broke in the admin, just get rid of them for now.
author Brian Neal <bgneal@gmail.com>
date Tue, 27 Aug 2013 20:54:38 -0500
parents d2e32fa2dc99
children 55ceb9824443
rev   line source
bgneal@58 1 from fabric.api import cd, run
bgneal@58 2
bgneal@58 3 PYTHON = '/home/var/django-sites/virtualenvs/madeira/bin/python'
bgneal@58 4 WC_DIR = '/home/var/django-sites/virtualenvs/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')