code: def get_fields(model, fields, meta=None):
      
      model = get_model(model)
      if fields is not None:
          f = fields
      elif meta and hasattr(model, meta):
          m = getattr(model, meta)
          if hasattr(m, 'fields'):
              f = m.fields
          else:
              f = model._fields_list
      else:
          f = model._fields_list
          
      fields_list = []
      for x in f:
          field = {}
          if isinstance(x, str):  #so x is field_name
              field['name'] = x
          elif isinstance(x, tuple):
              field['name'] = x[0]
              field['field'] = x[1]
          elif isinstance(x, dict):
              field = x.copy()
          else:
              raise UliwebError('Field definition {!r} is not right, it should be just like (field_name, form_field_obj)'.format(x))
          
          if 'prop' not in field:
              if hasattr(model, field['name']):
                  field['prop'] = getattr(model, field['name'])
              else:
                  field['prop'] = None
          
          fields_list.append((field['name'], field))
      return fields_list
docs: Acording to model and fields to get fields list
      Each field element is a two elements tuple, just like:
          (name, field_obj)