Skip to content

Instantly share code, notes, and snippets.

@kuma-hati-labo
kuma-hati-labo / django.cgi.py
Last active August 11, 2017 06:38 — forked from philchristensen/django.cgi.py
A very slow way to serve Django when all you have is CGI
#!/usr/bin/env python
# encoding: utf-8
"""
django.cgi
A simple cgi script which uses the django WSGI to serve requests.
Code copy/pasted from PEP-0333 and then tweaked to serve django.
http://www.python.org/dev/peps/pep-0333/#the-server-gateway-side