Пример #1
0
 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
Пример #2
0
 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