Skip to content

Instantly share code, notes, and snippets.

@collinanderson
Created January 19, 2015 17:36
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 collinanderson/186badabad97e8e68fb9 to your computer and use it in GitHub Desktop.
Save collinanderson/186badabad97e8e68fb9 to your computer and use it in GitHub Desktop.
os.environ['DJANGO_SETTINGS_MODULE'] = 'myproject.settings'
if __name__ == '__main__': # command line
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
else: # wsgi
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment