ImportError: No module named datahelpers.utils I am not able to import fail_with
On Friday, July 26, 2013 11:35:57 AM UTC-4, Alessandro Molina wrote: > > On Fri, Jul 26, 2013 at 5:14 PM, Dennis Backhaus < > [email protected] <javascript:>> wrote: > >> >> @validate(validators={"customer_id":validators.NotEmpty()}) >> def index(self, *args, **kw): >> >> to the UserController posted above. I also tried "kw.customer_id" (which >> does not really make sense, because kw is not yet defined at that point). >> Anyways: It does not do anything. It looks like this piece of code is just >> ignored, because when I browse to /admin/user, it still gives me an empty >> user form to add a new user - despite the missing customer_id. Ideas? >> >> > As you didn't provide an error_handler for the validation, it will just > put the errors in tmpl_context.form_errors and proceed as usual. > Again, look at the datahelpers documentation link I provided before: > https://bitbucket.org/_amol_/tgext.datahelpers#rst-header-utilities > The second block of code where @validate is used, it has an error_handler > that will make the page fail with a 404 when the parameter is not provided. > -- You received this message because you are subscribed to the Google Groups "TurboGears" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/turbogears. For more options, visit https://groups.google.com/groups/opt_out.

