Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- import sys
- import site
- site.addsitedir('/sites/.virtualenvs/mytrunk/lib/python2.6/site-packages')
- activate_this = '/sites/.virtualenvs/mytrunk/bin/activate_this.py'
- execfile(activate_this, dict(__file__=activate_this))
- from os.path import abspath, dirname, join
- from site import addsitedir
- os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
- os.environ['PYTHON_EGG_CACHE'] = os.path.abspath(os.path.join(os.path.dirname(__file__), "../../", "PYTHON_EGG_CACHE"))
- MY_PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), "../../"))
- sys.path.append(MY_PROJECT_ROOT)
- import django.core.handlers.wsgi
- application = django.core.handlers.wsgi.WSGIHandler()
Add Comment
Please, Sign In to add comment