Created
August 12, 2014 12:43
-
-
Save collinanderson/931a2855b3cb38a1f4bb to your computer and use it in GitHub Desktop.
manage.py + wsgi.py
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
#!/usr/bin/env python | |
import os | |
import site | |
import sys | |
sys.dont_write_bytecode = True # don't write .pyc files | |
sys.argv[0] = os.path.abspath(__file__) # show full path in ps and top | |
sys.path.append(os.path.dirname(__file__)) | |
site.addsitedir('/path/to/virtenv/lib/python2.7/site-packages') | |
os.environ['DJANGO_SETTINGS_MODULE'] = 'demo.settings' | |
if __name__ == '__main__': | |
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