Friday, November 17, 2006

Spyce 2.1.3

Another maintenance release.


   db module requires PK definition up-front (instead of erroring out later)
   default login render tags give better feedback on unsuccessful login
   raise NameError instead of string exception for invalid eval'd tag attributes
   fixes for spyceProject
   fix kwargs render-through on spy: list and table tags
   fix auto-selecting of multiple defaults in compound controls
   fix for class-based exceptions in old-style tag exception handlers

Wednesday, November 15, 2006

Translating Spyce form tags

Jeff Shell doesn't find Spyce tags easy to translate into "what HTML does this output?" That's my fault for writing crappy documentation, I guess, although I did think the examples helped a bit. :)

So, briefly, here's how you translate the Spyce form tags:

<f:text name=quest label="Question:" />
  • All the tags correspond closely with raw HTML. (This is part of Not Wasting Your Time.) If the HTML is "input type=foo," the corresponding Spyce tag is f:foo. So this will generate "input type=text."
  • Name attribute is the same as in HTML; by default Spyce also sets the ID attribute to the same as name, for convenience working with javascript. ID may of course be overridden separately.
  • The "Label" attribute generates a "label for=..." html tag pair. For most form elements, the label will be placed before the input; the exceptions are radio and checkbox buttons.
  • Spyce will add a "value" attribute for you if you don't specify one; this will be the value of the GET/PUT variable corresponding to the input name if there is one, or "" otherwise.

So, the HTML generated is

<label for="quest">Question:</label> <input type="text" name="quest" id="quest" value="">

I find the Spyce notation to be concise and intuitive, once you learn a few simple rules, but to each his own.

(I covered the more "advanced" stuff over here already. Guess I should have started with the basics!)

Thursday, November 02, 2006

The postgresql irc search bot

I saw something cool in #postgresql on freenode tonight. There is a bot in the channel named "rtfm_please;" he'll reply to messages with pages of the postgresql documentation on that subject. For instance,

(9:03:51 PM) jbellis: constraint
(9:03:51 PM) rtfm_please: For information about constraint
(9:03:51 PM) rtfm_please: see
(9:03:51 PM) rtfm_please: or
(9:03:51 PM) rtfm_please: or

Unfortunately it's not too bright:

(9:03:48 PM) jbellis: add constraint
(9:03:49 PM) rtfm_please: nothing found :-(

Apparently it's not really a search, but a manually-maintained collection of links (which explains why it's virtually instantaneous). I was amused to see this entry:

(9:23:36 PM) jbellis: mysql gotchas
(9:23:37 PM) rtfm_please: For information about mysql gotchas
(9:23:37 PM) rtfm_please: see

(Yeah, I'm an irc newbie.)