Skip to content

Conversation

@uzaxirr
Copy link
Contributor

@uzaxirr uzaxirr commented Oct 7, 2021

Note: Before submitting this pull request, please review our contributing guidelines.

Description

In current official docs version https://www.django-rest-framework.org/api-guide/views/
Screenshot from 2021-10-07 19-40-57
The given code spinnet will throw an error as Response hasn't been imported, so I imported Response through
from rest_framework.response import Response

@lovelydinosaur
Copy link
Contributor

Sure thing, thanks.

I'm pretty sure there's plenty of examples in the docs where we only show the import needed for the newly introduced bit of API, but I don't have a problem with this docs change.

@lovelydinosaur lovelydinosaur merged commit ddc5cd7 into encode:master Oct 7, 2021
@uzaxirr
Copy link
Contributor Author

uzaxirr commented Oct 7, 2021

Sure thing, thanks.

I'm pretty sure there's plenty of examples in the docs where we only show the import needed for the newly introduced bit of API, but I don't have a problem with this docs change.

Yes, Correct!!!
There are plenty of other examples where some modules haven't been imported. I'll make a PR fixing those soon

sigvef pushed a commit to sigvef/django-rest-framework that referenced this pull request Dec 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants