The Django REST Framework has its own Request object, which wraps the HttpRequest object passed to Django and adds some additional features (such as custom rendering and another level of authentication). If a Request object, which does not exist, has any properties, it automatically proxies it to the base HttpRequest , so usually you donโt notice the difference.
In DRF 2.x, the Request property has the DATA and FILES properties, which store the transferred data, as well as any detected files. They were merged into DRF 3.0 and replaced by a single DATA property. When DRF 3.0 was released, all documentation now reflects the new Request.data property.
You seem to be using Django REST Framework 2.x, but you are trying to access the new property introduced in DRF 3.0. Since it does not exist in the Request object, it is proxied to the HttpRequest object, where it is also not found.
source share