Skip to content
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

add viewset support #99

Merged
merged 1 commit into from Jun 23, 2016
Merged

add viewset support #99

merged 1 commit into from Jun 23, 2016

Conversation

sebdiem
Copy link
Contributor

@sebdiem sebdiem commented Jun 13, 2016

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.

@manosim
Copy link
Owner

manosim commented Jun 16, 2016

Looks good to me! If someone else can review too that would be great! We can then merge and release to PyPI!

@manosim manosim merged commit a001d9f into manosim:master Jun 23, 2016
@preston-scibek
Copy link

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
Copy link

@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.

@preston-scibek
Copy link

preston-scibek commented Jul 13, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants