Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7k
Description
During a workshop on Django REST framework, I realized the browsable API doesn't have links to thelist_route /detail_route actions.
While I started working on implementing it I realized it should be theViewSet responsibility to provide a list of custom actions. Currently all the work is done by the Router.
I'm opening the issue to discuss the possible directions.
My first though was to move the code that gathers the custom actions to theViewSet. However, I'm not too happy with it as it relies on theViewSet members having or not abind_to_methods attribute attached.
My proposal would be to have two lists (possibly dictionaries) within theViewSet that do hold thelist_route anddetail_route members. The decorator would then register their member to theViewSet.
Thoughts ?