Skip to content

Instantly share code, notes, and snippets.

@michaelhelmick
Created April 2, 2021 01:20
Show Gist options
  • Save michaelhelmick/cef33082a9e7cdf8cf750d7c4b49ed06 to your computer and use it in GitHub Desktop.
Save michaelhelmick/cef33082a9e7cdf8cf750d7c4b49ed06 to your computer and use it in GitHub Desktop.
versioning_example.py
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