On Apr 27, 9:45 pm, "Shannon -jj Behrens" <[EMAIL PROTECTED]> wrote:
> On 4/27/07, Gregory W. Bond <[EMAIL PROTECTED]> wrote:
>
>
> snip...
>
> I don't know anything about this REST stuff, but I do note that you called:
>
> h.url_for(id=num.number) # "id"
>
> but setup the map:
>
> map.connect('users/:user/numbers/:number', controller='users/numbers/
> numbers', action='delete',
> conditions=dict(method=['DELETE']))
>
> You used ":number" instead of ":id".
>
> I would guess that that is the problem.
sorry for the confusion - what you point out is simply a typo in my
post
to be clear: when i tried to use the the following route:
map.connect('users/:user/numbers/:id', controller='users/numbers/
numbers', action='delete', conditions=dict(method=['DELETE']))
and my 'numbers' controller contains the following function:
def delete(self, user, id):
print "id: %s" % id
.....
then 'id' is printed out to be 'None'
it turns out that 'id' is squirreled away in the request parameters
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---