Created
July 18, 2014 12:21
-
-
Save cansadadeserfeliz/2151b1fb2a3869f28f68 to your computer and use it in GitHub Desktop.
Django: convert model instance into dictionary
This file contains hidden or 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
| from django.forms.models import model_to_dict | |
| model_to_dict(instance, fields=[], exclude=[]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment