django-rest-framework
django-rest-framework copied to clipboard
Add documentation about how to transform factory request to DRF request
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:
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!