mattwilliamson
8/8/2010 - 9:30 PM

myproject.fcgi

#!/usr/bin/python2.6
import sys, os

# Add a custom Python path.
sys.path.insert(0, "..")

# Switch to the directory of your project. (Optional.)
os.chdir("/var/www/myproject")

os.environ['DJANGO_SETTINGS_MODULE'] = "settings"

from django.core.servers.fastcgi import runfastcgi
runfastcgi(["method=threaded", "daemonize=false"])