(self, context, setting, value)
Same as is domain context handler, but handles separately stored
        class_vars.
Same as is domain context handler, but handles separately stored
        class_vars.
Same as is domain context handler but handles separately stored class_vars .
def encode_setting(self, context, setting, value):
        """Same as is domain context handler, but handles separately stored
        class_vars."""

        if isinstance(setting, ContextSetting) and isinstance(value, str):

            def _candidate_variables():
                if not setting.exclude_attributes:
                    yield from itertools.chain(context.attributes,
                                               context.class_vars)
                if not setting.exclude_metas:
                    yield from context.metas

            for aname, atype in _candidate_variables():
                if aname == value:
                    return value, atype

            return value, -1
        else:
            return super().encode_setting(context, setting, value)
def encode_setting ( self , context , setting , value ) : if isinstance ( setting , ContextSetting ) and isinstance ( value , str ) : def _candidate_variables ( ) : if not setting . exclude_attributes : yield from itertools . chain ( context . attributes , context . class_vars ) if not setting . exclude_metas : yield from context . metas for aname , atype in _candidate_variables ( ) : if aname == value : return value , atype return value , - 1 else : return super ( ) . encode_setting ( context , setting , value )