[doc] Pass field to value callback in FieldsForm example stable
authorDenis Laxalde <denis.laxalde@logilab.fr>
Mon, 06 Jan 2014 13:45:47 +0100
branchstable
changeset 9423 76c0c96557f8
parent 9357 2790fb8f7e03
child 9424 5027afeb5739
[doc] Pass field to value callback in FieldsForm example This avoids a deprecation warning when following the documentation.
doc/book/en/devweb/edition/examples.rst
--- a/doc/book/en/devweb/edition/examples.rst	Fri Jun 21 14:22:39 2013 +0200
+++ b/doc/book/en/devweb/edition/examples.rst	Mon Jan 06 13:45:47 2014 +0100
@@ -55,7 +55,7 @@
 
 .. sourcecode:: python
 
-    def sender_value(form):
+    def sender_value(form, field):
 	return '%s <%s>' % (form._cw.user.dc_title(), form._cw.user.get_email())
 
     def recipient_choices(form, field):
@@ -63,7 +63,7 @@
                  for e in form.cw_rset.entities()
 		 if e.get_email()]
 
-    def recipient_value(form):
+    def recipient_value(form, field):
 	return [e.eid for e in form.cw_rset.entities()
                 if e.get_email()]