# HG changeset patch # User Denis Laxalde # Date 1389012347 -3600 # Node ID 76c0c96557f81d77ed4b9719f6ce6c035bda7981 # Parent 2790fb8f7e037457f5b689f543fba6c6fa33cdf0 [doc] Pass field to value callback in FieldsForm example This avoids a deprecation warning when following the documentation. diff -r 2790fb8f7e03 -r 76c0c96557f8 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()]