#!/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['listing_url'] = "/cgi-bin/listing.cgi?"+urlencode({'p': proj.path}) varz['make_url'] = "/cgi-bin/make.cgi?"+urlencode({'p': proj.path}) varz['rm_url'] = "/cgi-bin/rm.cgi?"+urlencode({'p': proj.path}) varz['save_url'] = "/cgi-bin/save.cgi?"+urlencode({'p': proj.path}) print """ hype : {0[project]}
""".format(varz)