Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3. import os
  4. import sys
  5.  
  6. sys.path.append(os.path.join(os.environ['OPENSHIFT_REPO_DIR']))
  7.  
  8. os.environ['DJANGO_SETTINGS_MODULE'] = 'mywebsite.settings'
  9.  
  10. virtenv = os.environ['OPENSHIFT_HOMEDIR'] + 'python-2.6/virtenv/'
  11. os.environ['PYTHON_EGG_CACHE'] = os.path.join(virtenv, 'lib/python2.6/site-packages')
  12.  
  13. virtualenv = os.path.join(virtenv, 'bin/activate_this.py')
  14. try:
  15. execfile(virtualenv, dict(__file__=virtualenv))
  16. except IOError:
  17. pass
  18. #
  19. # IMPORTANT: Put any additional includes below this line. If placed above this
  20. # line, it's possible required libraries won't be in your searchable path
  21. #
  22.  
  23. import django.core.handlers.wsgi
  24. application = django.core.handlers.wsgi.WSGIHandler()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement