Created
January 12, 2011 21:06
-
-
Save eyeseast/776879 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_app_data(project_path=None, app=None): | |
"Run dumpdata in a remote project and download the resulting JSON" | |
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