-
-
Notifications
You must be signed in to change notification settings - Fork 951
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
Consider an option for an explicit list of allowed methods #555
Comments
@muodov thanks for the feedback. I'd like to learn more about how you are using inheritance. Could you provide more details on your use case? |
@kgriffs Sure. In our application we store objects in mongodb, so in the code we have a base class called |
What about:
I may also need this. For a similar resource subclass pattern. |
Another option. This would override the default behavior of allowing all HTTP methods that have a corresponding on_* responder defined. class SomeResource(DocumentResource):
allow = ['GET'] |
@kgriffs I like your suggestion. It feels more natural for people coming from other frameworks, since they have similar concepts. |
Currently, routing code would allow all methods the responders are implemented for. But this behavior makes it inconvenient if one wants to inherit the resource class. The only way to disallow method in a child class is to override all the responders which results in a bunch of useless code.
It would be nice to be able to set some resource attribute to a list of allowed methods.
The text was updated successfully, but these errors were encountered: