def get_model_fields(cls):
    """ Return dict of model fields """
    fields = {}
    for field in cls._meta.get_fields():
        fields[field.name] = {'required': not field.blank, 'type': field.
            __class__.__name__, 'default': field.default}
    return fields
