django-rest-framework icon indicating copy to clipboard operation
django-rest-framework copied to clipboard

Add documentation about how to transform factory request to DRF request

Open mgaligniana opened this issue 10 months ago • 1 comments

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 https://github.com/encode/django-rest-framework/issues/6488#issuecomment-2049940926:

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: https://github.com/encode/django-rest-framework/issues/4440 and https://github.com/encode/django-rest-framework/issues/3608

This is what my proposal looks like:

image

I've also added a test to follow the Carlton's comment https://github.com/encode/django-rest-framework/issues/6488#issuecomment-2048962774

Thank you!

mgaligniana avatar Apr 12 '24 02:04 mgaligniana