Quixote 0.01
============

Quixote is yet another framework for developing Web applications in
Python.  The design goals were:

	1) To make the templating language as similar to Python in
	semantics as possible.  The aim is to make
	as many of the skills and techniques learned from writing
	regular Python code apply to write Web applications.

	2) To allow easy development of Web applications where the
	accent is more on complicated programming logic than
	complicated templating.

	3) The entire system should be implementable in a week or two.

Quixote has met goal #3, having been mostly implemented in a week, and
we think it also meets goal #1.  We are currently trying to write Web
applications using Quixote in an effort to verify that we've met goal
#2.

We've tried to reuse as much existing code as possible:

	* The HTTPRequest and HTTPResponse classes come from Zope,
	  with a few minor modifications.  They fall under the 
	  Zope Public Licence, available in doc/ZPL.txt.

	* The quixote.util.fcgi module is Robin Dunn's FastCGI module,
	  originally available from  
          <URL:http://starship.python.net/crew/robind/#fcgi>.


Overview
========

Quixote works by using a Python package to store all the code and HTML
for a Web-based application.  

PTL, Python Template Language, is used to mix HTML with Python code;
the basic syntax uses directives surrounded by <? and ?>.  See
doc/ptl.txt for the full syntax of PTL.  An example:

<? template form(request, response) ?>
  <? block ?>
import string
from mems.ui import standard 
<?/block?>

  <? standard.header(request, response, "Send Feedback") ?>
<? /template ?>

An import hook is defined so that PTL files (with the extension .ptl)
can be imported just like .py files containing Python source code.  A
template in PTL is similar to a Python function; if the above example
was placed into a file called pages.ptl, you could then do this:

import pages                   # Import the PTL file
output = pages.form(req_obj, resp_obj)

Your Web application's package might look like this:

webapp/				# Root of package
	__init__.py			
	module1.py
	module2.py
	pages1.ptl
	pages2.ptl
	app1/			# Subpackage for one subsystem
		__init__.py
		appmod.py
		pages.ptl
	app2/			# Subpackage for another subsystem
		__init__.py
	...



-- 
A.M. Kuchling <akuchlin@mems-exchange.org>
Greg Ward     <gward@python.net>


