{"action":"created","issue":{"url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/2934","labels_url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/2934/labels{/name}","comments_url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/2934/comments","events_url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/2934/events","html_url":"https://github.com/tomchristie/django-rest-framework/issues/2934","id":76299006,"number":2934,"title":"Move the `detail_route` / `list_route` lists back to `ViewSet`","user":{"login":"xordoquy","id":2340654,"avatar_url":"https://avatars.githubusercontent.com/u/2340654?v=3","gravatar_id":"","url":"https://api.github.com/users/xordoquy","html_url":"https://github.com/xordoquy","followers_url":"https://api.github.com/users/xordoquy/followers","following_url":"https://api.github.com/users/xordoquy/following{/other_user}","gists_url":"https://api.github.com/users/xordoquy/gists{/gist_id}","starred_url":"https://api.github.com/users/xordoquy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xordoquy/subscriptions","organizations_url":"https://api.github.com/users/xordoquy/orgs","repos_url":"https://api.github.com/users/xordoquy/repos","events_url":"https://api.github.com/users/xordoquy/events{/privacy}","received_events_url":"https://api.github.com/users/xordoquy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tomchristie/django-rest-framework/labels/Needs%20design%20decision","name":"Needs design decision","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-14T09:32:11Z","updated_at":"2015-05-15T14:16:12Z","closed_at":null,"body":"During a workshop on Django REST framework, I realized the browsable API doesn't have links to the `list_route` / `detail_route` actions.\r\nWhile 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.\r\n\r\nI'm opening the issue to discuss the possible directions.\r\nMy 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.\r\nMy 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`.\r\n\r\nThoughts ?"},"comment":{"url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/comments/102411075","html_url":"https://github.com/tomchristie/django-rest-framework/issues/2934#issuecomment-102411075","issue_url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/2934","id":102411075,"user":{"login":"tomchristie","id":647359,"avatar_url":"https://avatars.githubusercontent.com/u/647359?v=3","gravatar_id":"","url":"https://api.github.com/users/tomchristie","html_url":"https://github.com/tomchristie","followers_url":"https://api.github.com/users/tomchristie/followers","following_url":"https://api.github.com/users/tomchristie/following{/other_user}","gists_url":"https://api.github.com/users/tomchristie/gists{/gist_id}","starred_url":"https://api.github.com/users/tomchristie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomchristie/subscriptions","organizations_url":"https://api.github.com/users/tomchristie/orgs","repos_url":"https://api.github.com/users/tomchristie/repos","events_url":"https://api.github.com/users/tomchristie/events{/privacy}","received_events_url":"https://api.github.com/users/tomchristie/received_events","type":"User","site_admin":false},"created_at":"2015-05-15T14:16:12Z","updated_at":"2015-05-15T14:16:12Z","body":"Okay, so my viewpoint best thing would be to rephrase this.\r\nThe \"Move the `detail_route` / `list_route` lists back to `ViewSet`\" is implementation detail.\r\nWhat's the desired behavior, what do you want the browsable API to look like as a result?"}}