Quixote is yet another framework for developing Web applications in Python. The design goals were:
1) To allow easy development of Web applications where the emphasis is more on complicated programming logic than complicated templating.
2) To make the templating language as similar to Python as possible, in both syntax and semantics. The aim is to make as many of the skills and structural techniques used in writing regular Python code applicable to Web applications built using Quixote.
3) No magic. When it's not obvious what to do in a certain case, Quixote refuses to guess.
If you view a web site as a program, and web pages as subroutines, Quixote just might be the tool for you. If you view a web site as a graphic design showcase, and each web page as an individual work of art, Quixote is probably not what you're looking for.
An additional requirement was that the entire system had to be implementable in a week or two. The initial version of Quixote was indeed cranked out in about that time -- thank you, Python!
We've tried to reuse as much existing code as possible:
The HTTPRequest and HTTPResponse classes are distantly derived from their namesakes in Zope, but we've removed huge amounts of Zope-specific code.
The quixote.fcgi module is derived from Robin Dunn's FastCGI module, available at http://alldunn.com/python/#fcgi
Quixote requires Python 2.1 or greater to run. We only test Quixote with Python 2.3, but it should still work with 2.1 and 2.2.
For installation instructions, see the doc/INSTALL.txt file (or http://www.mems-exchange.org/software/quixote/doc/INSTALL.html).
If you're switching to a newer version of Quixote from an older version, please refer to doc/upgrading.txt for explanations of any backward-incompatible changes.
Quixote works by using a Python package to store all the code and HTML for a Web-based application. There's a simple framework for publishing code and objects on the Web, and the publishing loop can be customized by subclassing the Publisher class. You can think of it as a toolkit to build your own smaller, simpler version of Zope, specialized for your application.
An application using Quixote is a Python package containing .py and .ptl files.
webapp/ # Root of package
module1.py module2.py pages1.ptl pages2.ptl
PTL, the Python Template Language, is used to mix HTML with Python code. More importantly, Python can be used to drive the generation of HTML. An import hook is defined so that PTL files can be imported just like Python modules. The basic syntax of PTL is Python's, with a few small changes:
def plain [text] barebones_header(title=None, description=None): """