#!/usr/bin/env python import cgitb; cgitb.enable() import os, sys, cgi, mimetypes from settings import PROJECT_PATH, PROJECT_URL, EDITOR_URL from project import Project from urlparse import urljoin from urllib import urlencode print """Content-type: text/html; charset=utf-8""" print method = os.environ.get("REQUEST_METHOD", "") fs = cgi.FieldStorage() project = fs.getvalue("p", "") proj = Project(project) varz = {} varz['project'] = proj.path varz['cgi_url'] = "/cgi-bin/" print """