flask-restless icon indicating copy to clipboard operation
flask-restless copied to clipboard

Allow users to specify custom decorators for view methods

Open jfinkels opened this issue 8 years ago • 2 comments

This would allow users to easily apply decorators from other packages, such as Flask-Login, Flask-Cache (see issues #190, #99, and #318), and Flask-Limiter (see issue #189).

jfinkels avatar Mar 07 '16 04:03 jfinkels

Any progress on this? Any idea on how you would approach it? I need/could use this feature and feel that with some pointers I could probably figure it out.

james-bowen-bynd avatar Dec 15 '17 17:12 james-bowen-bynd

After perusing the source code, it seems that adding a decorators argument to one the appropriate method(s) in APIManager, and then passing the contents of that into the API class and appending it to the existing list of decorators is probably the most straightforward implementation of this feature. I'll see if I can whip something up over the weekend.

james-bowen-bynd avatar Dec 15 '17 17:12 james-bowen-bynd