def get_model_fields(model): vals = {} for p, v in vars(model).iteritems(): if util.is_serializable(p, v): vals[p] = v.__class__.__name__ return vals
def get_model_field_types(model): vals = {} for p, v in vars(model).iteritems(): if util.is_serializable(p, v): vals[p] = v return vals