Skip to content

Instantly share code, notes, and snippets.

@eyeseast
Created August 2, 2010 22:45
Show Gist options
  • Select an option

  • Save eyeseast/505466 to your computer and use it in GitHub Desktop.

Select an option

Save eyeseast/505466 to your computer and use it in GitHub Desktop.
from fabric.api import *
def get_app_data(project_path=None, app=None):
if not project_path:
project_path = prompt("Where do we find your project?")
if not app:
app = prompt("What app do you want data from?")
with cd(project_path):
run('python manage.py dumpdata %s --format=json --indent=4 > %s.json' % (app, app))
get('~/%s/%s.json' % (project_path, app), '%s.json' % app)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment