Skip to content

Imported Missing Response #8207

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

Merged
merged 1 commit into from
Oct 7, 2021
Merged

Imported Missing Response #8207

merged 1 commit into from
Oct 7, 2021

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

@tomchristie
Copy link
Member

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.

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