Coverage for gws-app / gws / base / model / widget.py: 100%
14 statements
« prev ^ index » next coverage.py v7.13.4, created at 2026-03-03 10:12 +0100
« prev ^ index » next coverage.py v7.13.4, created at 2026-03-03 10:12 +0100
1"""Base class for field widgets."""
3import gws
6class Props(gws.Props):
7 type: str
8 readOnly: bool
9 uid: str
12class Config(gws.Config):
13 """Configuration for the widget."""
15 readOnly: bool = False
16 """If True, the value is read-only."""
19class Object(gws.ModelWidget):
20 readOnly: bool
22 def configure(self):
23 self.readOnly = self.cfg('readOnly', default=False)
25 def props(self, user):
26 return Props(type=self.extType, readOnly=self.readOnly, uid=self.uid)