-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON Export is not working #175
Comments
Hi @mehaase , Have you resolved json reading issue? |
Investigating this issue today. From the command line I can download the json file just fine, e.g., http -v "localhost:8000/api/report-export/9/?type=json" "Cookie: sessionid=(REDACTED)" > report.json It seems this issue is triggered only in the browser, because the browser sends the header |
JSON exports were being rendered through an HTML template due to content negotiation in the browser (e.g. Accept:text/html). This commit forces the renderer to use JSON regardless of content negotiation and also cleans up the json and docx export code.
JSON exports were being rendered through an HTML template due to content negotiation in the browser (e.g. Accept:text/html). This commit forces the renderer to use JSON regardless of content negotiation and also cleans up the json and docx export code.
Based on Nick's feedback, reverted to using two ViewSets, moved the docx code into a custom renderer, and use Django's built in format parameter instead of type. This makes for a much cleaner PR.
JSON exports were being rendered through an HTML template due to content negotiation in the browser (e.g. Accept:text/html). This commit forces the renderer to use JSON regardless of content negotiation and also cleans up the json and docx export code.
Based on Nick's feedback, reverted to using two ViewSets, moved the docx code into a custom renderer, and use Django's built in format parameter instead of type. This makes for a much cleaner PR.
Based on Nick's feedback, reverted to using two ViewSets, moved the docx code into a custom renderer, and use Django's built in format parameter instead of type. This makes for a much cleaner PR.
Based on Nick's feedback, reverted to using two ViewSets, moved the docx code into a custom renderer, and use Django's built in format parameter instead of type. This makes for a much cleaner PR.
…ix-json-export Fix JSON export for reports (#175)
This is fixed in #180 and released in v1.2.0. |
It is exporting a JSON object, but it is embedded inside of an HTML document. It is supposed to be a stand-alone JSON document.
The text was updated successfully, but these errors were encountered: