core.bones.raw ============== .. py:module:: core.bones.raw Attributes ---------- .. autoapisummary:: core.bones.raw.SEARCH_TAGS Classes ------- .. autoapisummary:: core.bones.raw.RawBone Module Contents --------------- .. py:data:: SEARCH_TAGS .. py:class:: RawBone(*, compute = None, defaultValue = None, descr = None, getEmptyValueFunc = None, indexed = True, isEmptyFunc = None, languages = None, multiple = False, params = None, readOnly = None, required = False, searchable = False, type_suffix = '', unique = None, vfunc = None, visible = True, clone_behavior = None) Bases: :py:obj:`viur.core.bones.base.BaseBone` Stores its data without applying any pre/post-processing or filtering. Can be used to store any textual content. Use the dot-notation like "raw.code.markdown" or similar to describe subsequent types. This can also be achieved by adding `type_suffix="code.markdown"` to the RawBone's instantiation. ..Warning: Using this bone will lead to security vulnerabilities like reflected XSS unless the data is either otherwise validated/stripped or from a trusted source! Don't use this unless you fully understand it's implications! Initializes a new Bone. .. py:attribute:: type :value: 'raw' .. py:method:: singleValueFromClient(value, skel, bone_name, client_data) Load a single value from a client :param value: The single value which should be loaded. :param skel: The SkeletonInstance where the value should be loaded into. :param bone_name: The bone name of this bone in the SkeletonInstance. :param client_data: The data taken from the client, a dictionary with usually bone names as key :return: A tuple. If the value is valid, the first element is the parsed value and the second is None. If the value is invalid or not parseable, the first element is a empty value and the second a list of *ReadFromClientError*. .. py:method:: getSearchTags(skel, name) Returns a set of strings as search index for this bone. This function extracts a set of search tags from the given bone's value in the skeleton instance. The resulting set can be used for indexing or searching purposes. :param skel: The skeleton instance where the values should be loaded from. This is an instance of a class derived from `viur.core.skeleton.SkeletonInstance`. :param name: The name of the bone, which is a string representing the key for the bone in the skeleton. This should correspond to an existing bone in the skeleton instance. :return: A set of strings, extracted from the bone value. If the bone value doesn't have any searchable content, an empty set is returned.