Created
September 9, 2011 20:01
-
-
Save fcurella/1207173 to your computer and use it in GitHub Desktop.
django_bootstrap installation script
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 | |
| import urllib | |
| URL = 'https://raw.github.com/gist/1207150' | |
| INSTALL_DIR = '/usr/local/bin/' | |
| COMMAND_NAME = 'django_bootstrap' | |
| command_path = "%s%s" % (INSTALL_DIR, COMMAND_NAME) | |
| fh = urllib.urlopen(URL) | |
| fh2 = open(command_path, 'w') | |
| fh2.write(fh.read()) | |
| fh2.close() | |
| fh.close() | |
| os.chmod(command_path, int('755', 8)) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use it with
python -c "$(curl -fsSL https://raw.github.com/gist/1207173)"This will install a command called
django_bootstrapin/usr/local/binthat can be used to make new Django projects. This command will install virtualenv and pip system-wide (or update them), and will create a virtualenv with Django already installed for your project.django_bootstrap usage:
django_bootstrap <dir_name> <project_name>---
django_bootstrap code: https://gist.github.com/1207150