Skip to content

Instantly share code, notes, and snippets.

@michaelhelmick
Created April 2, 2021 13:21
Show Gist options
  • Save michaelhelmick/02e8d67fbeb38b2696cbabe113d80102 to your computer and use it in GitHub Desktop.
Save michaelhelmick/02e8d67fbeb38b2696cbabe113d80102 to your computer and use it in GitHub Desktop.
versioning_example_v2.py
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