old_contents: # import fabrics API functions
  from fabric.api import *
  
  def prepare_deploy():
     #local("./manage.py test my_app")
     local("git add -p && git commit")
  
  def deploy():
     env.hosts =
     code_dir = '/srv/django/myproject'
     with cd(code_dir):
        run("git pull")
        run("touch app.wsgi")
  
  def dev():
     """ Use development server settings """
     env.hosts = ['www-cartoterra@gueux.org']
     env['dir'] = '~/cartoterra/'
     code_dir = '~/cartoterra/'
     with cd(code_dir):
        run("git pull")
        run("touch wsgi.py")
  
  
new_contents: # import fabrics API functions
  from fabric.api import *
  
  env.hosts = ['www-cartoterra@gueux.org:22']
  
  def addcommit():
     local("git add -p && git commit")
  
  def push():
     local("git push")
  
  def prepare_deploy():
     #local("./manage.py test geodata")
     local("git add -p && git commit")
     local("git push")
  
  def deploy():
     code_dir = '/srv/django/myproject'
     with cd(code_dir):
        run("git pull")
        run("touch wsgi.py")
  
  def dev():
     """ Use development server settings """
     code_dir = '~/cartoterra/'
     with cd(code_dir):
        run("git pull")
        run("touch wsgi.py")
  
  
subject: modify fabfile.py