Created
February 19, 2011 21:11
-
-
Save tkaemming/835367 to your computer and use it in GitHub Desktop.
wrapper for django-admin.py that automatically bootstraps it's virtualenv
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
#!/usr/bin/env python | |
import os | |
ENVIRONMENT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')) | |
activate_file = os.path.join(ENVIRONMENT_ROOT, 'bin', 'activate_this.py') | |
execfile(activate_file, dict(__file__=activate_file)) | |
admin_file = os.path.join(ENVIRONMENT_ROOT, 'bin', 'django-admin.py') | |
execfile(admin_file) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment