Open kaelteschutz opened 7 years ago
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 as_view()
when you register a view into the router.
router.register(r'foo', FooViewSet.as_view(), base_name='foo'
This should look like
router.register(r'foo', FooViewSet, base_name='foo'
You shouldn't be including the
as_view()
when you register a view into the router.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
You shouldn't be including the
as_view()
when you register a view into the router.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