Description
During a workshop on Django REST framework, I realized the browsable API doesn't have links to the list_route
/ detail_route
actions.
While I started working on implementing it I realized it should be the ViewSet
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 the ViewSet
. However, I'm not too happy with it as it relies on the ViewSet
members having or not a bind_to_methods
attribute attached.
My proposal would be to have two lists (possibly dictionaries) within the ViewSet
that do hold the list_route
and detail_route
members. The decorator would then register their member to the ViewSet
.
Thoughts ?