Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add documentation about how to transform factory request to DRF request#9380

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
mgaligniana wants to merge2 commits intoencode:master
base:master
Choose a base branch
Loading
frommgaligniana:add-documentation-to-transform-factory-request-to-drf-request

Conversation

mgaligniana
Copy link
Contributor

@mgalignianamgaligniana commentedApr 12, 2024
edited
Loading

Description

Hi there!

As there were many issues opened around this topic:"APIRequestFactorydoes not return aRequest 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!

ulgens reacted with heart emoji
@mgaligniana
Copy link
ContributorAuthor

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

Copy link
Collaborator

@carltongibsoncarltongibson 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 plusinitial() and calling a (fictional) view method, which would be the point of the test.

Make sense?

But, yes, great.

@staleStale
Copy link

stalebot commentedApr 27, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stalestalebot added the stale labelApr 27, 2025
@auvipyauvipy removed the stale labelApr 28, 2025
@@ -102,6 +102,20 @@ This means that setting attributes directly on the request object may not always
request.user = user
response = view(request)

In case you want to test the request having a REST famework's `Request` you have to transform it by-hand before:
Copy link
Member

Choose a reason for hiding this comment

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

I think we can rewrite the text

@staleStale
Copy link

stalebot commentedJun 27, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stalestalebot added the stale labelJun 27, 2025
@ulgens
Copy link
Contributor

I think this is still relevant and shouldn't be marked as stale.

@mgaligniana
Copy link
ContributorAuthor

Hi ulgens! Yes, auvipy fixed the text I added but let me know if there is other change required!

@stalestalebot removed the stale labelJun 27, 2025
@ulgens
Copy link
Contributor

@mgaligniana No change requests & recommendations on my end. I just saw the notification from the stale bot and thought that this is better merged than lost.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@carltongibsoncarltongibsoncarltongibson left review comments

@auvipyauvipyauvipy left review comments

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@mgaligniana@ulgens@carltongibson@auvipy

[8]ページ先頭

©2009-2025 Movatter.jp