(self, commit=True, **kwargs)
return commit and self.save() or self
Update specific fields of a record.
Update specific fields of a record.
Update specific fields of a record .
def update(self, commit=True, **kwargs):
        """Update specific fields of a record."""
        for attr, value in kwargs.items():
            setattr(self, attr, value)
        return commit and self.save() or self
def update ( self , commit = True , * * kwargs ) : for attr , value in kwargs . items ( ) : setattr ( self , attr , value ) return commit and self . save ( ) or self