-
Notifications
You must be signed in to change notification settings - Fork 183
add viewset support #99
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
Conversation
Looks good to me! If someone else can review too that would be great! We can then merge and release to PyPI!
preston-scibek
commented
Jun 28, 2016
Might I suggest adding to the documentation something about adding the following the urls.py if using viewsets and router?
url(r'^docs/', DRFDocsView.as_view(drf_router=router), name='drfdocs')
egamonal
commented
Jul 13, 2016
@preston-scibek are you sure?
I added that line with the corresponding import from rest_framework_docs.views import DRFDocsView
and I got an error:
TypeError: DRFDocsView() received an invalid keyword 'drf_router'. as_view only accepts arguments that are already attributes of the class.
maybe it is just a bug on my local machine then, I had to do that to get it to work but if it's giving you an error, than it's most likely to do with my machine.
edit: By work, I mean to display urls that come from viewsets
This is how I would solve issue #58.
I think that using the rest framework router, which provides all the magic, is probably the cleanest way.