I'm setting up a REST-based set of URLs for a Pylons app using Routes and it
looks like there is an issue when using the pseudo-REQUEST_METHOD, i.e.
'_method' and WebHelpers.
In particular, if I use h.link_to with an arg of 'method':'DELETE' the form
that
is generated for the link has the _method attribute set to 'delete', not
DELETE,
which causes Routes to fail to find a matching route.
If I change line 253 in the current version (r1449) of urls.py in WebHelpers to:
submit_function += "m.setAttribute('name', '_method');
m.setAttribute('value',
'%s'); f.appendChild(m);" % method.upper()
i.e. upper-case the method value, then everything works as expected.
There looks to be several other areas where the value for _method should be
upper-cased or the original method keyword arg should not be lower-cased :-)
Robert
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---