Tuesday, August 23, 2011

Hidden gem for inspecting django models

from django.forms.models import model_to_dict

To inspect the properties of a djago model:

>>> model_to_dict(obj)
{ ... }

No comments:

Post a Comment