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

Pass a context in depth of serialize calls (API changed) #41

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Harut
Copy link
Contributor

@Harut Harut commented Mar 10, 2017

Currently serpy fields are both stateless and context-less, i.e. you can not access anything except the current value from inside of a serializers. While statelesness makes serpy fast and clear, there is no real reason not to pass context to lower levels of data serializers.

Most obvious use case: serialize URLs as absolute depending on a request.

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

Successfully merging this pull request may close these issues.

1 participant