from fabric.api import *


env.roledefs = {
    'staging': [],
    'production': [],
}


@roles('staging')
def deploy_staging():
    # Remove this line when you're happy that this task is correct
    raise RuntimeError("Please check the fabfile before using it")

    run('git pull origin staging')
    run('pip install -r requirements.txt')
    run('django-admin migrate --noinput')
    run('django-admin collectstatic --noinput')
    run('django-admin compress')
    run('django-admin update_index')

    # 'restart' should be an alias to a script that restarts the web server
    run('restart')


@roles('production')
def deploy_production():
    # Remove this line when you're happy that this task is correct
    raise RuntimeError("Please check the fabfile before using it")

    run('git pull origin master')
    run('pip install -r requirements.txt')
    run('django-admin migrate --noinput')
    run('django-admin collectstatic --noinput')
    run('django-admin compress')
    run('django-admin update_index')

    # 'restart' should be an alias to a script that restarts the web server
    run('restart')

@@ -42,23 +42,26 @@
  %7B%0A    '
-staging
+production
 ': %5B%5D,%0A 
@@ -60,34 +60,31 @@
 ': %5B%5D,%0A    '
-production
+staging
 ': %5B%5D,%0A%7D%0A%0A%0A@
@@ -90,23 +90,26 @@
 @roles('
-staging
+production
 ')%0Adef d
@@ -114,23 +114,26 @@
  deploy_
-staging
+production
 ():%0A    
@@ -288,23 +288,22 @@
  origin 
-staging
+master
 ')%0A    r
@@ -602,34 +602,31 @@
 )%0A%0A%0A@roles('
-production
+staging
 ')%0Adef deplo
@@ -623,34 +623,31 @@
 %0Adef deploy_
-production
+staging
 ():%0A    # Re
@@ -790,38 +790,39 @@
 git pull origin 
-master
+staging
 ')%0A    run('pip 

Reorder fabfile