-
Notifications
You must be signed in to change notification settings - Fork 88
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
Possible bug: '?format=csv' is appended to URLs in the downloaded CSV #56
Comments
If I'm understanding correctly, you're seeing the filenames contain "?format=csv" when it's supplied in the URL. There's currently no way within the renderer to specify the name of the generated file. That might be something that you'd want to handle within the view by adding a |
Thanks for your reply. It is not the file name but the values within the file that are URL's (hyperlinks in the browsable API); e.g., the value of "user" could be "http://api.mysite/users/22/", and wrongly appear as "http://api.mysite/users/22/?format=csv". |
@dfarre This is actually because of the way that DRF constructs links to relations. I could think of a few things you could do:
- OR -
- OR -
|
We are with the last version using the
PaginatedCSVRenderer
, specified in the settings. CSVs are not correctly downloaded if we either put 'format=csv' in the query string or use the drop-down menu for choosing the format in the browsable API; then '?format=csv' is appended to the URLs in the downloaded CSVs - using hyperlinked serializers. URLs are correct if we specify 'text/csv' in the accept header and not in the query string.The text was updated successfully, but these errors were encountered: