Skip to content

Instantly share code, notes, and snippets.

@vinilios
Created January 19, 2010 00:29
Show Gist options
  • Save vinilios/280533 to your computer and use it in GitHub Desktop.
Save vinilios/280533 to your computer and use it in GitHub Desktop.
django uwsgi compatible wsgi file
# name it something like mysitedotcom_wsgi
# /usr/bin/uwsgi -s 127.0.0.1:46235 -t 10 -M -p 1 -C -w mysitedotcom_wsgi -H ~/venvs/virtualenv
import sys, os
import django.core.handlers.wsgi
# lets redirect print statements to stderr
# (this is useful to redirect print statements to web servers error log file)
sys.stdout = sys.stderr
# PATH DEBUG
# print "\n".join(sys.path)
# force settings
# os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
application = django.core.handlers.wsgi.WSGIHandler()
applications = {'/': application, }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment