Skip to content

Instantly share code, notes, and snippets.

@ajhodgson
Created October 12, 2023 17:08
Show Gist options
  • Save ajhodgson/96c51dba349697e5c7e46027cc530434 to your computer and use it in GitHub Desktop.
Save ajhodgson/96c51dba349697e5c7e46027cc530434 to your computer and use it in GitHub Desktop.
passenger_wsgi.py for Django with virtualenv
import os,sys
INTERP = "/home/app/webapp/env/bin/python"
if sys.executable != INTERP:
os.execl(INTERP, INTERP, *sys.argv)
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