Skip to content

Instantly share code, notes, and snippets.

@mattwilliamson
Created August 8, 2010 21:30
Show Gist options
  • Save mattwilliamson/514564 to your computer and use it in GitHub Desktop.
Save mattwilliamson/514564 to your computer and use it in GitHub Desktop.
#!/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"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment