from django.core import serializers

def obj_to_dict(model_instance):
    serial_obj = serializers.serialize('json', [model_instance])
How can I turn Django Model objects into a dictionary and still have their foreign keys?