Created
April 2, 2021 13:21
-
-
Save michaelhelmick/02e8d67fbeb38b2696cbabe113d80102 to your computer and use it in GitHub Desktop.
versioning_example_v2.py
This file contains 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
def get_serializer_class(self): | |
if self.request.version in ['v1', 'v2']: | |
return AccountSerializerVersion1 | |
return AccountSerializer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment