Skip to content

Instantly share code, notes, and snippets.

@aaronromeo
Created November 22, 2014 17:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronromeo/23e133a6689d7c1a47b1 to your computer and use it in GitHub Desktop.
Save aaronromeo/23e133a6689d7c1a47b1 to your computer and use it in GitHub Desktop.
Django Rest Framework notes

Django Rest Framework notes

Field conversion using the django rest framework has not been overly intuitive. This might help

  • to_native - Object -> End User (json)
    • This is used to convert a complex object to a primitive Python types
  • from_native - End User (json) -> Object
    • This is used to convert primitive Python types to a complex object

Also see this example from the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment