QWeb Framework

QuickStart
----------

$ wget http://antony.lesuisse.org/qweb/QWeb-0.3.tgz
$ tar zxvf QWeb-0.3.tgz
$ cd QWeb-0.3/tutorial2
$ ./demoapp.fcgi

point your browser to http://localhost:8080/

The examples are tutorial*/

WARNING: Despite their naming in .fcgi, the example are ALSO RUNNABLE FROM
COMMANDLINE.

When runned from command line where they start their own webserver on port
8080.  They also may be run as FastCGI or regular CGI by any FastCGI or CGI
compatible web server.


Features
--------

QWeb provides the following components, each component may be used
independently of all the others:

	- An xml templating engine
	- An simple controller
	- A WSGI request handler
	- A WSGI server

QWeb doesn't provide any database access but it intergrates nicely with ORMs
such as SQLObject, SQLAachemy or the plain DB-API API.

QWeb application are runnable:

	- in standalone mode (run it from commandline)
	- in FastCGI mode (throught a FastCGI compatible webserver)
	- in Regular CGI mode (throught a CGI compatible webserver)
	- from php using support/php/pyphp
	- from asp.net using support/aspnet


The WSGI request handler
------------------------

QWebRequest:
QWebSession(dict):
QWebSessionMem(QWebSession):
	A WSGI HTPP request handler, that feature GET, POST and POST multipart
	methods. Easy handling of cookies and headers and Sessions (either on the
	filesystem or in memory).


The templating engine
---------------------

The templating engine use a very simple syntax, "magic" xml attributes, to
produce any kind of texutal output (even non-xml).

QWebXml:
	the template engine core implements the basic magic attributes:

	t-raw t-esc t-if t-foreach t-set t-call t-trim

QWebURL:
QWebField:
QWebForm:
QWebHtml:
	an extended template engine, with a few utility class to easily produce
	HTML, handle URLs and process forms, it adds the following magic attributes:

	t-href t-action t-form-text t-form-password t-form-textarea t-form-radio
	t-form-checkbox t-form-select t-option t-selected t-checked t-pager


The controler
--------------

qweb_control(self,jump='main',p=[]):
	a simple function to handle the controler part of your application.


The WSGI server
---------------

QWebWSGIServer(SocketServer.ThreadingMixIn, BaseHTTPServer.HTTPServer)
qweb_wsgi_autorun(wsgiapp,ip='127.0.0.1',port=8080,threaded=1)
	A WSGI HTTP server threaded or not and a function to automatically run your
	app according to the environement (either standalone, CGI or FastCGI).

	This feature is called QWeb autorun. If you want to  To use it on your
	application use the following lines at the end of the main application
	python file:

	if __name__ == '__main__':
		qweb.qweb_wsgi_autorun(your_wsgi_app)

	this function will select the approriate running mode according to the
	calling environement (http-server, FastCGI or CGI).


An WSGI app to server static files
----------------------------------
QWebWSGIAppServeFile(root=".", uriroot="/", listdir=1, banner='')
	A small WSGI app to server static files.

License
-------
qweb/fcgi.py wich is BSD-like from saddi.com.
Everything else is put in the public domain.

