E&S CVS Commit:
WebHaiku - Bug fixes, refactoring, and new features:
pje at eby-sarna.com
pje at eby-sarna.com
Sun Jan 14 13:16:50 EST 2007
Author: pje
Date: Sun Jan 14 13:16:49 2007
New Revision: 2262
URL: http://svn.eby-sarna.com?rev=2262&view=rev
Log:
Bug fixes, refactoring, and new features:
* Container is gone; the framework now automatically detects
containerness if you override handle_child or define sub-pages. So
everything is now either a Page or a Form.
* Trailing-'/' redirection now goes both ways, according to whether
a page is a container or not.
* Page.__init__ accepts keyword arguments to set class-defined
attributes at creation. This is useful for containers that invoke
dynamic subpages in handle_child().
* An extensible setup() method is provided for subclass-specific
initialization, prior to go() being invoked.
* Template expressions can now reference the module globals of the
module where the template was created.
* Pages can have a ``body`` attribute (a template or WSGI-return
method) which will be invoked for GET requests.
* HEAD requests are now only handled if GET is supported (i.e., if a
``body`` is defined), and the wrapping of GET is a bit cleaner.
* If you define a ``db_connect()`` method returning a DBAPI connection
object, you can use the ``query()`` method to do SQL queries, and
your subpages will automatically "inherit" the database connection
from their parent pages/container(s).
Not bad for <550 lines!
Modified:
WebHaiku/web_haiku.py
More information about the source-changes
mailing list