MCPcopy Index your code
hub / github.com/fastapi-admin/fastapi-admin / Field

Class Field

fastapi_admin/resources.py:33–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31
32
33class Field:
34 name: str
35 label: str
36 display: displays.Display
37 input: inputs.Input
38
39 def __init__(
40 self,
41 name: str,
42 label: Optional[str] = None,
43 display: Optional[displays.Display] = None,
44 input_: Optional[Widget] = None,
45 ):
46 self.name = name
47 self.label = label or name.title()
48 if not display:
49 display = displays.Display()
50 display.context.update(label=self.label)
51 self.display = display
52 if not input_:
53 input_ = inputs.Input()
54 input_.context.update(label=self.label, name=name)
55 self.input = input_
56
57
58class ComputeField(Field):

Callers 4

AdminResourceClass · 0.90
ProductResourceClass · 0.90
ConfigResourceClass · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected