code: def get_field(name, model=None):
      
      if '.' in name:
          m, name = name.split('.')
          model = get_model(m)
  
      if model:
          return getattr(model, name, None)
docs: get model field according to name, the name can be like `model.column`