Skip to content

Instantly share code, notes, and snippets.

@mirskiy
Created September 28, 2016 21:09
Show Gist options
  • Save mirskiy/32bf03746d8706776a3145a94fe8dacd to your computer and use it in GitHub Desktop.
Save mirskiy/32bf03746d8706776a3145a94fe8dacd to your computer and use it in GitHub Desktop.
django tricks
# model new insance or update
# http://stackoverflow.com/a/35647389
self._state.adding == True creating
self._state.adding == False updating
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment