Created
April 2, 2021 01:20
-
-
Save michaelhelmick/cef33082a9e7cdf8cf750d7c4b49ed06 to your computer and use it in GitHub Desktop.
versioning_example.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 == 'v1': | |
return AccountSerializerVersion1 | |
return AccountSerializer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment