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

move dataframe creation code to view? #8

Closed
sheppard opened this issue Sep 10, 2014 · 1 comment
Closed

move dataframe creation code to view? #8

sheppard opened this issue Sep 10, 2014 · 1 comment

Comments

@sheppard
Copy link
Member

DRP currently requires the use of a custom serializer.data method that returns a Pandas dataframe. It might be more flexible to allow whatever serializer people want to use and do the DataFrame creation & manipulation entirely on the view. This would likely mean overridding view.list() and adding a call to a new self.create_dataframe(serializer.data)

@sheppard sheppard changed the title move serializer code to view? move dataframe creation code to view? Sep 10, 2014
@sheppard
Copy link
Member Author

DataFrame creation is now handled by a separate pandas_serializer_class, which corresponds to the new list_serializer_class in DRF 3 (#10). For backwards compatibility with DRF 2.4, this class is mixed in to any user-defined serializer class on the view.

This change makes it easier to define custom non-DRP serializers and still benefit from DRP.

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

1 participant