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 ?
Okay, so my viewpoint best thing would be to rephrase this.
The "Move the detail_route / list_route lists back to ViewSet" is implementation detail.
What's the desired behavior, what do you want the browsable API to look like as a result?
The initial work is to get links to the list/detail additional routes.
During the workshop, we implemented one of them and I felt there should be a link to them to ease the navigation.
Okay, we may as well go with a concrete example of the behavior being suggested.

Where would we be linking to associated actions?
I don't think I've got any particular issue with having this info also (or instead) associated with ViewSets. Havn't done much around that area of the codebase myself lately, so be interesting to see what potential Pull Requests for this might look like.
I think this is outside of our current scope/bandwidth. I'd be happy to consider this either:
If the admin interface has settled down and is being widely used then I think we'll have a good point to discuss it from, until then I don't think it's within what we're able to deal with.
I would also like to be able to see ViewSet actions in the browsable API. Currently the workaround to this as far as i'm aware is to include a hyperlink to the actions within the ViewSet Serializer, however this has the side effect of actually including the hyperlink in the API output which may or may not be desired (can a field be marked as 'browsable API only'?).
@Aldarn this will come back one day or another when we'll have more time to work on this or a client will request it :)
Was this ever revisited? And if not, is now maybe a good time to look at this, given 3.4 has shipped?
Tracking this in #2062, which I believe describes the same thing, right?
I don't think so - related but different. #2062 seems to be about rendering a different serializer for a specific action (such as a change password form for a user's account). This issue is more about exposing that action as a link. Right now, the browsable API doesn't expose any of the action links - you would just have to know that a change password action exists.
Moving list/detail routers to view sets sounds to me like an additional API DRF needs.
Since we have more and more schema and stuff like that and some of which are 3rd parties I _strongly_ believe we should make an API to "publish" the various routes.
Okay, so updating #2062 to suggest that we consider _linking_ to the actions, rather than including them on the page itself. That sounds sensible.
Most helpful comment
I don't think so - related but different. #2062 seems to be about rendering a different serializer for a specific action (such as a change password form for a user's account). This issue is more about exposing that action as a link. Right now, the browsable API doesn't expose any of the action links - you would just have to know that a change password action exists.