jfinkels / flask-restless

NO LONGER MAINTAINED - A Flask extension for creating simple ReSTful JSON APIs from SQLAlchemy models.
https://flask-restless.readthedocs.io
GNU Affero General Public License v3.0
1.02k stars 301 forks source link

Allow users to specify custom decorators for view methods #497

Open jfinkels opened 8 years ago

jfinkels commented 8 years ago

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).

james-bowen-bynd commented 6 years ago

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 commented 6 years ago

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.