Here is y code

class FormForwarding(widgets.TableForm):
    fields = [
        MultipleHiddenFields('context'),
        widgets.CheckBox('active', label="Activate forwarding",
validator=validators.Bool()),
        widgets.TextField('forward_addr', label="Address to forward
to", attrs=dict(size=40, maxlength=255), validator=EmailValidator()),
        widgets.CheckBox('keep', label="Keep a copy on server",
validator=validators.Bool()),
    ]
    submit_text = "Update forwarding"

here is my "action" method :

    @turbogears.expose()
    @validate(form=forwarding_form)
    @error_handler(index)
    def update_forwarding(self, email_addr, forward_addr, active,
keep, **kwargs):
        ...

If one of both checkbox is unchecked, I get error:

exceptions.TypeError: ('update_forwarding() takes at least 5 non-
keyword arguments (3 given)', <function _wrapper at 0xa5e5224>)

more debug info
args    ()
errors  []
fn      <bound method Mailbox.update_forwarding of
<emailgency.addr_ctrl.Mailbox object at 0xa39cb6c&g...t;>
kw      {'email_addr': u'[EMAIL PROTECTED]', 'forward_addr':
u'[EMAIL PROTECTED]', 'keep': u'on...'}
predicate       <turbogears.identity.conditions.in_any_group object at
0xa2e8a0c>

<<          errors= []
            if predicate.eval_with_object( current, errors ):
                return fn( *args, **kw )
            else:
                raise IdentityFailure( errors )>>  return fn( *args,
**kw )
exceptions.TypeError: ('update_forwarding() takes at least 5 non-
keyword arguments (3 given)', <function _wrapper at 0xa5e5224>)

TG 1.0.2.2


Regards


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to