Skip to content

Instantly share code, notes, and snippets.

@dlo
Created March 9, 2010 05:18
Show Gist options
  • Select an option

  • Save dlo/326254 to your computer and use it in GitHub Desktop.

Select an option

Save dlo/326254 to your computer and use it in GitHub Desktop.
Django WSGI File
import os
import sys
sys.stdout = sys.stderr
PATH = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.abspath(os.path.join(PATH, '..')))
os.environ['PYTHON_EGG_CACHE'] = '/usr/local/django/python-eggs'
os.environ['DJANGO_SETTINGS_MODULE'] = 'myproject.settings'
from paste.evalexception.middleware import EvalException
application = EvalException(WSGIHandler())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment