def model_to_dict(instance, fields=None, exclude=None):
return {<EOL>field.name: field_to_dict(field, instance)<EOL>for field in chain(instance._meta.concrete_fields, instance._meta.many_to_many)  <EOL>if not should_exclude_field(field, fields, exclude)<EOL>}<EOL>
The same implementation as django model_to_dict but editable fields are allowed