Hello,
I keep thinking I understand how this works but I never quite
understand. I go to a method that requires an argument but don't
pass the argument for exampe accessing '/archive' in the browser with
the below code. Shouldn't the validator catch this and in a friendly
fashion redirect me to the index method?
CONTROLLERS:
@expose()
@validate(validators=dict(id=validators.Int(not_empty=True)))
@error_handler(index)
def archive(self, id):
ERROR:
Page handler: <function _wrapper at 0xb602779c>
Traceback (most recent call last):
File
"/usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py",
line 105, in _run
self.main()
File
"/usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py",
line 254, in main
body = page_handler(*virtual_path, **self.params)
File
"/usr/lib/python2.4/site-packages/TurboGears-1.0b1-py2.4.egg/turbogears/identity/conditions.py",
line 275, in _wrapper
return fn( *args, **kw )
TypeError: archive() takes at least 2 arguments (1 given)
Thanks,
-Ian
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---