#2313: Validate decorator does not work with url args
------------------------+---------------------------------------------------
Reporter: chrisz | Owner:
Type: defect | Status: new
Priority: high | Milestone:
Component: TurboGears | Version: 2.0rc1
Severity: major | Keywords: validate
------------------------+---------------------------------------------------
To reproduce the problem, quickstart an application, add the following
at the top of controllers/root,
{{{
from tg import validate
from formencode import validators
}}}
and change the index method of the root controller like this:
{{{
@expose('foo.templates.index')
@validate(validators=dict(nr=validators.Int()))
def index(self, nr=None):
...
}}}
Now run the application and surf to http://localhost:8080/index/1.
The validator should pass, but I'm getting this:
{{{
TypeError: index() got multiple values for keyword argument 'nr'
}}}
See also [http://groups.google.de/group/turbogears-
trunk/browse_thread/thread/4da01ac6e78e416d this thread] in the tg-trunk
mailing list.
--
Ticket URL: <http://trac.turbogears.org/ticket/2313>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---