python - Django: Converting an entire set of a Model's objects into a single dictionary - Stack Overflow
167 down voteYou can also rely on django code already written ;).
from django.forms.models import model_to_dict model_to_dict(instance, fields=[], exclude=[])
浙公网安备 33010602011771号