Как импортировать model_to_dict
from django.forms.models import model_to_dict
model_to_dict(instance)
Evil Eagle
from django.forms.models import model_to_dict
model_to_dict(instance)