Skip to content

Instantly share code, notes, and snippets.

@gmansilla
Last active August 29, 2015 14:02
Show Gist options
  • Select an option

  • Save gmansilla/3739733ff9a40b9041b5 to your computer and use it in GitHub Desktop.

Select an option

Save gmansilla/3739733ff9a40b9041b5 to your computer and use it in GitHub Desktop.
import __main__
__main__.__requires__ = ['ReviewBoard']
import pkg_resources
import os
import sys
os.environ['DJANGO_SETTINGS_MODULE'] = "reviewboard.settings"
os.environ['PYTHON_EGG_CACHE'] = "/var/www/reviewboard/tmp/egg_cache"
os.environ['HOME'] = "/var/www/reviewboard/data"
os.environ['PYTHONPATH'] = '/var/www/reviewboard/conf:' + os.environ.get('PYTHONPATH', '')
#os.environ['PYTHONPATH'] = '/var/www/reviewboard/conf:/usr/bin/python2.6/site-packages'
sys.path = ['/var/www/reviewboard/conf'] + sys.path
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment