Skip to content

Instantly share code, notes, and snippets.

@herberthamaral
Created January 14, 2014 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save herberthamaral/8419973 to your computer and use it in GitHub Desktop.
Save herberthamaral/8419973 to your computer and use it in GitHub Desktop.
Add --settings option to manage.py
#excerpt from manage.py
settings_arg = [arg for arg in sys.argv if arg.startswith('--settings=')]
if settings_arg:
settings = __import__(settings_arg[0].split('=')[1])
else:
import settings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment