Last active
April 13, 2022 05:02
-
-
Save jangjichang/c8e802c575bc1e1055707fa6c5f80401 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class BaseSerializer(Field): | |
| def __init__(self, instance=None, data=empty, **kwargs): | |
| self.instance = instance | |
| if data is not empty: | |
| self.initial_data = data | |
| self.partial = kwargs.pop('partial', False) | |
| self._context = kwargs.pop('context', {}) | |
| kwargs.pop('many', None) | |
| super().__init__(**kwargs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment