Hi,
Quick question: How can I validate arguments sent through a GET
(similar to the validate
decorator in TurboGears)?
In my controller I have this method:
@validate(validators={"count": validators.Int()})
def getCount(self,count):
return Response('<b>%d</b>' % count)
however when I navigate there with
http://bogus.hostname.here:5000/ping/getCount/123
I get:
Module pingsite.controllers.ping:20 in getCount
return Response('<b>%d</b>' % count)
exceptions.TypeError: int argument required
I looked at the validate function under pylons.decorators but it looks
geared to
validating form data that is POSTed. I probably missed something.
Your help would be greatly appreciated.
G