Created
August 2, 2010 22:45
-
-
Save eyeseast/505466 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
| 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