Guest User

Untitled

a guest
Jun 22nd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. def null_validator(*args, **kwargs):
  2. """A validator that doesn't validate anything.
  3.  
  4. This is somewhat lame, but if you have a "Cancel" type button that
  5. won't want to validate the form, you need something like this.
  6.  
  7. @form.action(_(u"label_cancel", default=u"Cancel"),
  8. validator=null_validator,
  9. name=u'cancel')
  10. """
  11. return ()
Add Comment
Please, Sign In to add comment