-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: as_view() takes 1 positional argument but 2 were given #55
Comments
Just ran into this as well. Tested on 0.2.1 and on the latest master. |
Ugh, this is due to poor explanation in the README. The example given there uses a View, not a ViewSet, which I failed to notice due to the name being really long. Switching to having my ViewSet inherit from BulkModelViewSet fixed the issue. |
@melinath with all the problems I see you're finding and fixing, I don't suppose you have a fork of this repo before I start getting in to it? |
@someidiot I've been fine with workarounds for now; I usually prefer not to fork unless absolutely necessary. |
apologies for delays everyone. doing house renovations.... so no time to look at any of my open-source stuff. I promise eventually I will actually take a look at the issues in this repo. they have been piling up.... |
@miki725 thanks for making this! |
Agree with @melinath, thanks for making this. As long as issues are properly identified and solvable... |
You shouldn't be including the router.register(r'foo', FooViewSet.as_view(), base_name='foo' This should look like router.register(r'foo', FooViewSet, base_name='foo' |
in which file should include this |
urls.py |
My code is exactly like in the example in the README
when I do
The API endpoint
foo/
is not availableIt would be great to have a simple_app that also works in django 1.8 or restframework > 3
The text was updated successfully, but these errors were encountered: