Created
March 18, 2010 19:53
-
-
Save callen23dc/336793 to your computer and use it in GitHub Desktop.
This file contains 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
import os | |
from optparse import OptionParser | |
usage = "usage: %prog -s SETTINGS | --settings=SETTINGS" | |
parser = OptionParser(usage) | |
parser.add_option('-s', '--settings', dest='settings', metavar='SETTINGS', | |
help="The Django settings module to use") | |
(options, args) = parser.parse_args() | |
if not options.settings: | |
parser.error("You must specify a settings module") | |
os.environ['DJANGO_SETTINGS_MODULE'] = options.settings |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment