Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: weekend-burnra…
Fetching contributors…

Cannot retrieve contributors at this time

44 lines (23 sloc) 0.649 kB
from fabric.api import local, env
env.git_remote = 'dev'
def prod():
env.git_remote = 'prod'
def heroku(cmd):
local("heroku run '{0}' --remote {1}".format(cmd, env.git_remote))
def heroku_django(cmd):
heroku("python manage.py {0}".format(cmd))
def deploy():
push()
collect_static()
syncdb()
def push():
local('git push {0} master'.format(env.git_remote))
def collect_static():
heroku_django('collectstatic --noinput')
def syncdb():
heroku_django('syncdb')
heroku_django('migrate')
def cron(command):
heroku_django('cron {0}'.format(command))
def clear_cache():
cron('clear_cache')
Jump to Line
Something went wrong with that request. Please try again.