MCPcopy
hub / github.com/fastapi-admin/fastapi-admin / _get_fields_attr

Method _get_fields_attr

fastapi_admin/resources.py:188–194  ·  view source on GitHub ↗
(cls, attr: str, display: bool = True)

Source from the content-addressed store, hash-verified

186
187 @classmethod
188 def _get_fields_attr(cls, attr: str, display: bool = True):
189 ret = []
190 for field in cls.get_fields():
191 if display and isinstance(field.display, displays.InputOnly):
192 continue
193 ret.append(getattr(field, attr))
194 return ret or cls.model._meta.db_fields
195
196 @classmethod
197 def get_fields_name(cls, display: bool = True):

Callers 2

get_fields_nameMethod · 0.80
get_fields_labelMethod · 0.80

Calls 1

get_fieldsMethod · 0.80

Tested by

no test coverage detected