New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow controllers to handle request_method #10

pauleveritt opened this Issue Oct 16, 2014 · 3 comments


None yet
2 participants

pauleveritt commented Oct 16, 2014

Per @wichert from another ticket comment: "Can't you define a separate resource there? Alternatively it shouldn't be too hard to make the request method for a controller configurable."

Is it ok if I work on pull request for this? Basic idea would be to allow:

@SomeResource.controller(name='reboot', method='GET')

The goal for this is to allow multiple GET views on a single resource.

@wichert wichert closed this in f6c4b56 Oct 24, 2014


This comment has been minimized.


pauleveritt commented Oct 27, 2014

Gave it a try with:

@AuthResource.controller(name='login', request_method='POST')

...and got:

File "/Users/paul/projects/moonshot/env34/lib/python3.4/site-packages/rest_toolkit/", line 108, in callback
TypeError: add_view() got multiple values for keyword argument 'request_method'

That line has:


Here is my code:


On Oct 24, 2014, at 4:51 PM, Wichert Akkerman wrote:

Closed #10 #10 via f6c4b56 f6c4b56.

Reply to this email directly or view it on GitHub #10 (comment).


This comment has been minimized.


wichert commented Oct 27, 2014

There is a discrepancy between the code and the documentation: the documentation uses request_method, but the code uses method. I'll update the code to use request_method to better Pyramid conventions.

wichert added a commit that referenced this issue Oct 27, 2014


This comment has been minimized.


pauleveritt commented Oct 28, 2014

That worked, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment