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 documentation about how to transform factory request to DRF request #9380

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mgaligniana
Copy link
Contributor

@mgaligniana mgaligniana commented Apr 12, 2024

Description

Hi there!

As there were many issues opened around this topic: "APIRequestFactory does not return a Request object" I think it would be worth to have a place in the documentation where explains it.

Following the Tom's comment in the last issue #6488 (comment):

If someone's invested and there's clearly a good existing place in the docs to highlight this, then we could accept a docs PR here.

*Past issues related: #4440 and #3608

This is what my proposal looks like:

image

I've also added a test to follow the Carlton's comment #6488 (comment)

Thank you!

@mgaligniana
Copy link
Contributor Author

Hi @carltongibson! Is something like that the documentation you had in mind?

Copy link
Collaborator

@carltongibson carltongibson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @mgaligniana, it's similar!

I think people do this when they're testing individual view methods, without going via dispatch.

So, I'd be inclined to say, and show, that. I.e. what you have plus initial() and calling a (fictional) view method, which would be the point of the test.

Make sense?

But, yes, great.

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