Skip to content
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

Include a paginated renderer as part of the app #17

Open
lylepratt opened this issue May 22, 2014 · 3 comments
Open

Include a paginated renderer as part of the app #17

lylepratt opened this issue May 22, 2014 · 3 comments

Comments

@lylepratt
Copy link

Thanks for this great add-on!

For some reason when I download my data in CSV format, it is returned in 2 giant rows, with all items combined on the rows.

Screenshot:
https://www.dropbox.com/s/8aecjorj658om2s/Screenshot%202014-05-22%2009.47.49.png

Why is this happening and how do I get it to correctly export the rows?

Thanks,
Lyle

@mjumbewu
Copy link
Owner

Hey @lylepratt,

Sorry for the delay here. This is happening because the renderer doesn't automatically know how to deal with pagination. There is an example of what to do in the README though: https://github.com/mjumbewu/django-rest-framework-csv/blob/master/README.rst#pagination

I'm pretty sure someone ran in to this before. This renderer should probably be a proper part of the app.

EDIT: I've updated the title of the ticket.

@mjumbewu mjumbewu changed the title Data formatted in 2 rows Include a paginated renderer as part of the app Jun 18, 2014
@peritus
Copy link

peritus commented Mar 19, 2015

I think it would be a good idea to add the PaginatedCSVRenderer in https://github.com/mjumbewu/django-rest-framework-csv/blob/master/rest_framework_csv/renderers.py and ship it as part of django-rest-framework-csv — so users don't have top copy&paste it from the README to their own application but can just do

from rest_framework_csv.renderers import PaginatedCSVRenderer

should I create a separate issue for that ?

@Guest007
Copy link

Guest007 commented Aug 8, 2016

If I have globally setted
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
for all my JSON rendered endpoints, I can't see anything in my single CSV endpoint. How I can switch off pagination for exactly CSV endpoint?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants