def _get_value(self, name, kw):
        default = kw.pop("default", "")
        # This used to be ``self.record in self.undefined_values``, but this
        # fails if the record is a dict because dicts aren't hashable.
        for undefined_value in self.undefined_values:
            if self.record == undefined_value:
                return default
        if self.use_keys:
            return self.record[name]    # Raises KeyError.
        else:
            return getattr(self.record, name)   # Raises AttributeError.
Get the current value of a field from the database record.
dataset/ETHPy150Open mikeorr/WebHelpers2/webhelpers2/html/tags.py/ModelTags._get_value