docs: def get_fields(model):
      """
      Returns a Model's knockout_fields,
      or the default set of field names.
      """
  
      try:
          if hasattr(model, "knockout_fields"):
              fields = model.knockout_fields()
          else:
              try:
                  fields = model_to_dict(model).keys()
              except Exception as e:
                  fields = model._meta.get_fields()
          return fields
  
      # Crash proofing
      except Exception as e:
          logger.exception(e)
          return []