[Checkins] SVN: z3c.formjs/trunk/src/z3c/formjs/ajax.txt add capability for ajax handlers to return dictionaries lists and tuples that get automatically converted into JSON strings.

Paul Carduner paulcarduner at gmail.com
Sun May 11 20:04:11 EDT 2008


Log message for revision 86663:
  add capability for ajax handlers to return dictionaries lists and tuples that get automatically converted into JSON strings.

Changed:
  U   z3c.formjs/trunk/src/z3c/formjs/ajax.txt

-=-
Modified: z3c.formjs/trunk/src/z3c/formjs/ajax.txt
===================================================================
--- z3c.formjs/trunk/src/z3c/formjs/ajax.txt	2008-05-11 23:58:21 UTC (rev 86662)
+++ z3c.formjs/trunk/src/z3c/formjs/ajax.txt	2008-05-12 00:04:10 UTC (rev 86663)
@@ -35,8 +35,7 @@
   >>> class PingForm(ajax.AJAXRequestHandler, form.Form):
   ...
   ...     @ajax.handler
-  ...     def pingBack(self):
-  ...         message = self.request.get('message', 'Nothing to ping back.')
+  ...     def pingBack(self, message=u'Nothing to ping back.'):
   ...         return "from %r: %s" % (self, message)
   ...
   ...     @ajax.handler



More information about the Checkins mailing list