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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss
-~----------~----~----~----~------~----~------~--~---