{"action":"created","issue":{"url":"https://api.github.com/repos/miki725/django-rest-framework-bulk/issues/55","repository_url":"https://api.github.com/repos/miki725/django-rest-framework-bulk","labels_url":"https://api.github.com/repos/miki725/django-rest-framework-bulk/issues/55/labels{/name}","comments_url":"https://api.github.com/repos/miki725/django-rest-framework-bulk/issues/55/comments","events_url":"https://api.github.com/repos/miki725/django-rest-framework-bulk/issues/55/events","html_url":"https://github.com/miki725/django-rest-framework-bulk/issues/55","id":181134362,"number":55,"title":"TypeError: as_view() takes 1 positional argument but 2 were given","user":{"login":"kaelteschutz","id":18686244,"avatar_url":"https://avatars.githubusercontent.com/u/18686244?v=3","gravatar_id":"","url":"https://api.github.com/users/kaelteschutz","html_url":"https://github.com/kaelteschutz","followers_url":"https://api.github.com/users/kaelteschutz/followers","following_url":"https://api.github.com/users/kaelteschutz/following{/other_user}","gists_url":"https://api.github.com/users/kaelteschutz/gists{/gist_id}","starred_url":"https://api.github.com/users/kaelteschutz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaelteschutz/subscriptions","organizations_url":"https://api.github.com/users/kaelteschutz/orgs","repos_url":"https://api.github.com/users/kaelteschutz/repos","events_url":"https://api.github.com/users/kaelteschutz/events{/privacy}","received_events_url":"https://api.github.com/users/kaelteschutz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-05T12:03:10Z","updated_at":"2016-10-24T22:20:29Z","closed_at":null,"body":"```\r\nUnhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x102470840>\r\nTraceback (most recent call last):\r\n  File \"/Users/n/Sites/VEUNDMINT_TUB_Brueckenkurs/venv/lib/python3.5/site-packages/django/utils/autoreload.py\", line 226, in wrapper\r\n    fn(*args, **kwargs)\r\n  File \"/Users/n/Sites/VEUNDMINT_TUB_Brueckenkurs/venv/lib/python3.5/site-packages/django/core/management/commands/runserver.py\", line 121, in inner_run\r\n    self.check(display_num_errors=True)\r\n  File \"/Users/n/Sites/VEUNDMINT_TUB_Brueckenkurs/venv/lib/python3.5/site-packages/django/core/management/base.py\", line 385, in check\r\n    include_deployment_checks=include_deployment_checks,\r\n  File \"/Users/n/Sites/VEUNDMINT_TUB_Brueckenkurs/venv/lib/python3.5/site-packages/django/core/management/base.py\", line 372, in _run_checks\r\n    return checks.run_checks(**kwargs)\r\n  File \"/Users/n/Sites/VEUNDMINT_TUB_Brueckenkurs/venv/lib/python3.5/site-packages/django/core/checks/registry.py\", line 81, in run_checks\r\n    new_errors = check(app_configs=app_configs)\r\n  File \"/Users/n/Sites/VEUNDMINT_TUB_Brueckenkurs/venv/lib/python3.5/site-packages/django/core/checks/urls.py\", line 14, in check_url_config\r\n    return check_resolver(resolver)\r\n  File \"/Users/n/Sites/VEUNDMINT_TUB_Brueckenkurs/venv/lib/python3.5/site-packages/django/core/checks/urls.py\", line 24, in check_resolver\r\n    for pattern in resolver.url_patterns:\r\n  File \"/Users/n/Sites/VEUNDMINT_TUB_Brueckenkurs/venv/lib/python3.5/site-packages/django/utils/functional.py\", line 35, in __get__\r\n    res = instance.__dict__[self.name] = self.func(instance)\r\n  File \"/Users/n/Sites/VEUNDMINT_TUB_Brueckenkurs/venv/lib/python3.5/site-packages/django/urls/resolvers.py\", line 310, in url_patterns\r\n    patterns = getattr(self.urlconf_module, \"urlpatterns\", self.urlconf_module)\r\n  File \"/Users/n/Sites/VEUNDMINT_TUB_Brueckenkurs/venv/lib/python3.5/site-packages/django/utils/functional.py\", line 35, in __get__\r\n    res = instance.__dict__[self.name] = self.func(instance)\r\n  File \"/Users/n/Sites/VEUNDMINT_TUB_Brueckenkurs/venv/lib/python3.5/site-packages/django/urls/resolvers.py\", line 303, in urlconf_module\r\n    return import_module(self.urlconf_name)\r\n  File \"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/importlib/__init__.py\", line 126, in import_module\r\n    return _bootstrap._gcd_import(name[level:], package, level)\r\n  File \"<frozen importlib._bootstrap>\", line 986, in _gcd_import\r\n  File \"<frozen importlib._bootstrap>\", line 969, in _find_and_load\r\n  File \"<frozen importlib._bootstrap>\", line 958, in _find_and_load_unlocked\r\n  File \"<frozen importlib._bootstrap>\", line 673, in _load_unlocked\r\n  File \"<frozen importlib._bootstrap_external>\", line 665, in exec_module\r\n  File \"<frozen importlib._bootstrap>\", line 222, in _call_with_frames_removed\r\n  File \"/Users/n/Sites/VEUNDMINT_TUB_Brueckenkurs/src/server/veundmint/veundmint/urls.py\", line 33, in <module>\r\n    url(r'^', include(router.urls)),\r\n  File \"/Users/n/Sites/VEUNDMINT_TUB_Brueckenkurs/venv/lib/python3.5/site-packages/rest_framework/routers.py\", line 81, in urls\r\n    self._urls = self.get_urls()\r\n  File \"/Users/n/Sites/VEUNDMINT_TUB_Brueckenkurs/venv/lib/python3.5/site-packages/rest_framework/routers.py\", line 355, in get_urls\r\n    urls = super(DefaultRouter, self).get_urls()\r\n  File \"/Users/n/Sites/VEUNDMINT_TUB_Brueckenkurs/venv/lib/python3.5/site-packages/rest_framework/routers.py\", line 261, in get_urls\r\n    view = viewset.as_view(mapping, **route.initkwargs)\r\nTypeError: as_view() takes 1 positional argument but 2 were given\r\n```\r\n\r\nMy code is exactly like in the example in the README\r\n```\r\n# Routers provide an easy way of automatically determining the URL conf.\r\nrouter = BulkRouter()\r\nrouter.register(r'server-action', WebsiteActionViewSet)\r\nrouter.register(r'score', ScoreViewSet, base_name='scores')\r\nrouter.register(r'whoami', UserViewSet, base_name='whoami')\r\nrouter.register(r'foo', FooViewSet)\r\n\r\nurlpatterns = [\r\n    #url(r'^', include('veundmint_base.urls')),\r\n    url(r'^', include(router.urls)),\r\n    url(r'^admin/', admin.site.urls),\r\n    url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),\r\n    url(r'^api-token-auth/', obtain_jwt_token),\r\n]\r\n```\r\nwhen I do\r\n```\r\nrouter.register(r'foo', FooViewSet.as_view(), base_name='foo')\r\n```\r\nThe API endpoint `foo/` is not available\r\n\r\nIt would be great to have a simple_app that also works in django 1.8 or restframework > 3"},"comment":{"url":"https://api.github.com/repos/miki725/django-rest-framework-bulk/issues/comments/255882939","html_url":"https://github.com/miki725/django-rest-framework-bulk/issues/55#issuecomment-255882939","issue_url":"https://api.github.com/repos/miki725/django-rest-framework-bulk/issues/55","id":255882939,"user":{"login":"melinath","id":299979,"avatar_url":"https://avatars.githubusercontent.com/u/299979?v=3","gravatar_id":"","url":"https://api.github.com/users/melinath","html_url":"https://github.com/melinath","followers_url":"https://api.github.com/users/melinath/followers","following_url":"https://api.github.com/users/melinath/following{/other_user}","gists_url":"https://api.github.com/users/melinath/gists{/gist_id}","starred_url":"https://api.github.com/users/melinath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/melinath/subscriptions","organizations_url":"https://api.github.com/users/melinath/orgs","repos_url":"https://api.github.com/users/melinath/repos","events_url":"https://api.github.com/users/melinath/events{/privacy}","received_events_url":"https://api.github.com/users/melinath/received_events","type":"User","site_admin":false},"created_at":"2016-10-24T22:20:29Z","updated_at":"2016-10-24T22:20:29Z","body":"Just ran into this as well. Tested on 0.2.1 and on the latest master."}}
{"actor":{"display_login":"melinath"}}