{"action":"opened","issue":{"url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/4064","repository_url":"https://api.github.com/repos/tomchristie/django-rest-framework","labels_url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/4064/labels{/name}","comments_url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/4064/comments","events_url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/4064/events","html_url":"https://github.com/tomchristie/django-rest-framework/issues/4064","id":150282454,"number":4064,"title":"Namespace support for AcceptHeaderVersioning (and probably some others)","user":{"login":"saintcrawler","id":17233060,"avatar_url":"https://avatars.githubusercontent.com/u/17233060?v=3","gravatar_id":"","url":"https://api.github.com/users/saintcrawler","html_url":"https://github.com/saintcrawler","followers_url":"https://api.github.com/users/saintcrawler/followers","following_url":"https://api.github.com/users/saintcrawler/following{/other_user}","gists_url":"https://api.github.com/users/saintcrawler/gists{/gist_id}","starred_url":"https://api.github.com/users/saintcrawler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saintcrawler/subscriptions","organizations_url":"https://api.github.com/users/saintcrawler/orgs","repos_url":"https://api.github.com/users/saintcrawler/repos","events_url":"https://api.github.com/users/saintcrawler/events{/privacy}","received_events_url":"https://api.github.com/users/saintcrawler/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-22T06:32:25Z","updated_at":"2016-04-22T06:32:25Z","closed_at":null,"body":"AcceptHeaderVersioning don't respect namespaces in view names. When I have hyperlinked serializers this error occurs: \r\n\r\n> ImproperlyConfigured: Could not resolve URL for hyperlinked relationship using view name \"{model}-detail\".\r\n\r\nI've made a quick fix for myself, implementing 'reverse' method of AcceptHeaderVersioning class like this:\r\n```\r\nclass NamespacedAcceptHeaderVersioning(versioning.AcceptHeaderVersioning):\r\n    \r\n    def reverse(self, viewname, args=None, kwargs=None, request=None, format=None, **extra):\r\n        if request:\r\n            viewname = self.get_namespaced_viewname(viewname, request)\r\n        return super().reverse(viewname, args, kwargs, request, format, **extra)\r\n\r\n    def get_namespaced_viewname(self, viewname, request):\r\n        resolver_match = getattr(request, 'resolver_match')\r\n        if resolver_match:\r\n            return resolver_match.namespace + ':' + viewname\r\n        else:\r\n            return viewname\r\n```\r\nWouldn't it be nice to include this in versioning.py by default? Namespacing views is a very cool feature of django."}}