[Subversion] / WebHaiku / web_haiku.py  

Log of /WebHaiku/web_haiku.py

Parent Directory

No default branch
Bookmark a link to HEAD: (view) (download) (as text)


Revision 2443 - (view) (download) (as text) - [select for diffs]
Modified Sat Dec 22 16:19:03 2007 UTC (16 years, 3 months ago) by pje
File length: 20066 byte(s)
Diff to previous 2278 , to selected 2269
Use Contextual for database services

Revision 2278 - (view) (download) (as text) - [select for diffs]
Modified Wed Jan 24 03:06:24 2007 UTC (17 years, 2 months ago) by pje
File length: 19977 byte(s)
Diff to previous 2277 , to selected 2269
Support dotted identifiers in templates, so you don't have to use $(? ?) 
for simple attribute access.

Revision 2277 - (view) (download) (as text) - [select for diffs]
Modified Wed Jan 24 01:45:35 2007 UTC (17 years, 2 months ago) by pje
File length: 19933 byte(s)
Diff to previous 2276 , to selected 2269
More new features

* Redirector objects redirect to a URL with embedded vars or expressions

* @expose makes normal functions into subpages, ala Template.page()

* More tests, docs

Revision 2276 - (view) (download) (as text) - [select for diffs]
Modified Tue Jan 23 03:26:51 2007 UTC (17 years, 2 months ago) by pje
File length: 19536 byte(s)
Diff to previous 2275 , to selected 2269
More doc and tests, support query string in auto-redirects, and
sort 'Allow' methods (so doctests are stable).

Revision 2275 - (view) (download) (as text) - [select for diffs]
Modified Tue Jan 23 02:10:46 2007 UTC (17 years, 2 months ago) by pje
File length: 19431 byte(s)
Diff to previous 2269
New features and bug fixes:

* Added a ``test()`` function to make it easy to doctest any WSGI app

* Improved debug support for ``EvalMap`` -- previously, pdb could crash
  if you inspected the stack while evaluating a template expression.

* Improved HEAD method that should correctly compute Content-Length for 
  any WSGI app, even ones that use write().

* Fixed cgi.escape not working as a method (it needed to be a 
  staticmethod)

* Added some preliminary doctests to README.txt (need refactoring and 
  some actual docs!)

Revision 2269 - (view) (download) (as text) - [selected]
Modified Thu Jan 18 03:14:19 2007 UTC (17 years, 2 months ago) by pje
File length: 14907 byte(s)
Diff to previous 2268
Don't make form vars visible attributes unless explicitly declared (via 
form_defaults).

Revision 2268 - (view) (download) (as text) - [select for diffs]
Modified Sun Jan 14 22:57:41 2007 UTC (17 years, 2 months ago) by pje
File length: 14888 byte(s)
Diff to previous 2267 , to selected 2269
Make cgi.escape a method of pages, and add debugging info to EvalMap 
KeyErrors.

Revision 2267 - (view) (download) (as text) - [select for diffs]
Modified Sun Jan 14 21:44:58 2007 UTC (17 years, 2 months ago) by pje
File length: 14878 byte(s)
Diff to previous 2266 , to selected 2269
Compute page's URL once, w/out including any subpath traversal.

Revision 2266 - (view) (download) (as text) - [select for diffs]
Modified Sun Jan 14 21:00:12 2007 UTC (17 years, 2 months ago) by pje
File length: 14892 byte(s)
Diff to previous 2265 , to selected 2269
More new features:

* page.URL returns the page's URL

* page.query() now returns an iterator of rows; you can still get a
  database cursor via page.cursor().  The yielded row objects from
  query() are just plain old objects with attributes corresponding
  to the result's field names.

Revision 2265 - (view) (download) (as text) - [select for diffs]
Modified Sun Jan 14 19:21:59 2007 UTC (17 years, 2 months ago) by pje
File length: 14496 byte(s)
Diff to previous 2263 , to selected 2269
Fix infinite redirect if a leaf page is the website root.

Revision 2263 - (view) (download) (as text) - [select for diffs]
Modified Sun Jan 14 18:51:40 2007 UTC (17 years, 2 months ago) by pje
File length: 14581 byte(s)
Diff to previous 2262 , to selected 2269
More features, less cruft...

* @validator is now @form_handler, and it can also be used as
  @form_handler(priority) to put the handlers in a priority order.
  Each handler can return a WSGI response (in which case handling
  is terminated) or None (in which case handler invocation continues).
  When all handlers have been called, either self.form_failure() or
  self.form_success() are invoked, according to whether self.errors
  is empty.
  
* The Form class is no longer needed.  POST handling is automatically
  supported if any @form_handler methods are defined.  To support
  GET forms, add::

      body = Page.POST

  to your class, and GET handling will be identical to POST handling.

* self.parse_form() now returns the form data, but will only do the
  parsing once.  All pages can now have autogenerated attributes from
  the form_data FieldStorage and the form_defaults dictionary.


Revision 2262 - (view) (download) (as text) - [select for diffs]
Modified Sun Jan 14 18:16:49 2007 UTC (17 years, 2 months ago) by pje
File length: 13944 byte(s)
Diff to previous 2261 , to selected 2269
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!



Revision 2261 - (view) (download) (as text) - [select for diffs]
Added Sun Jan 14 06:00:18 2007 UTC (17 years, 2 months ago) by pje
File length: 11194 byte(s)
Diff to selected 2269
Quick-and-dirty ultra-light WSGI-based microframework.
The main design goals are to minimize the footprint
for installation requirements, memory use, and startup
time.

So all it does is dispatch and templating; the templates
are basically souped-up string.Template objects with
some limited expression capabilities, but arbitrary
TG/Buffet template engines are also supported, and the
template mechanism supports creating templates from
egg resources (e.g.  foo = HTML(resource="foo.html"))
that are adjacent to the invoking module.

There is also some very basic form parsing and validation
support.  More features may be added as I need them... or
not.

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

  Diffs between and
  Type of Diff should be a

Sort log by:

cvs-admin@eby-sarna.com

Powered by ViewCVS 1.0-dev

ViewCVS and CVS Help