django-commons / drf-excel

An XLSX spreadsheet renderer for Django REST Framework.
BSD 3-Clause "New" or "Revised" License
217 stars 40 forks source link

Could not satisfy the request Accept header #80

Closed HodaSadatJafari closed 6 months ago

HodaSadatJafari commented 9 months ago

I get the following error when I use this package: { "detail": "Could not satisfy the request Accept header." }

rptmat57 commented 9 months ago

Hi @HodaSadatJafari , Which version of django/drf are you using?

Do you have a test case to reproduce the issue by any chance?

HodaSadatJafari commented 9 months ago

djangorestframework==3.14.0 Django==4.2.4

Can this package handle nested serializer? I think I get this error or this error "Object of type QuerySet is not JSON serializable" when I have nested serializer. Like this example: image

rptmat57 commented 9 months ago

I just ran a test with the same versions and a SerializerMethodField and it worked just fine.

I think your error might be triggered by something else.

FlipperPA commented 8 months ago

@HodaSadatJafari Have a look at this: https://stackoverflow.com/questions/30903951/django-doesnt-parse-a-custom-http-accept-header

What is making the request to the endpoint? It sounds like it is sending something non-standard.

FlipperPA commented 6 months ago

Closing, no response.