#!/usr/bin/env python # # (c) 2014 Michael Murtaugh and contributors to the Digital Publishing Toolkit # License: GPL3 # This code has been developed as part of the [Digital Publishing Toolkit](http://digitalpublishingtoolkit.org). # with the support of Institute for [Network Cultures](http://networkcultures.org) # and [Creating 010](http://creating010.com). 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 """ hype : {0[project]}
""".format(varz)