se adiciona @fields.on_change para ejecutar funcion cuando se cambian los varoles de algun attributo

FossilOrigin-Name: bee19b201f8c1a6b972c2a9abfe5fb57a558a67be6ecddce4f7f07b5b6980215
This commit is contained in:
bit4bit
2021-06-25 23:21:04 +00:00
parent b6219bd171
commit c694603505
7 changed files with 77 additions and 2 deletions

View File

@@ -16,4 +16,6 @@ class Attribute(Field):
def __set__(self, inst, value):
assert self.name is not None
self.value = value
self._changed_field(inst, self.name, value)
inst._set_attribute(self.name, self.attribute, value)