Artem Liubymov
Artem Liubymov

Reputation: 11

How to solve .accepted_renderer not set on Response Error on POST Request, Django

got a problem when trying to call request using Postman, on POST request always get

AssertionError at /v1/facility/33/court/ .accepted_renderer not set on Response Request Method: POST Request URL:

On Get request other endpoints works fine. Django version - 3.2.15

Class that responsible for this endpoint already have APIView class

class ItemAPIView(
CSRFEnabledApiViewMixin, CreateAPIView, RetrieveUpdateDestroyAPIView):

Even If I put APIView class as last nested class it not working.

Who can help with this? what is wrong?

Note: if I will doing curl request to such endpoint POST - error is the same

Upvotes: 0

Views: 602

Answers (1)

Maxim Danilov
Maxim Danilov

Reputation: 3360

accepted_renderer` is an attribute for request from DjangoRestFramework.

Django itself don't add accepted_renderer to request.

Try to check if you call the DRF-view with Django request.

Upvotes: 0

Related Questions