Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ab3fx
ab3fx / django.cgi.py
Last active August 28, 2016 14:47 — forked from philchristensen/django.cgi.py
A very slow way to serve Django when all you have is CGI
#!/usr/bin/env python3
# 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