:py:mod:`oioioi.portals.models` =============================== .. py:module:: oioioi.portals.models Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: oioioi.portals.models.Node oioioi.portals.models.NodeLanguageVersion oioioi.portals.models.Portal .. py:class:: Node(*args, **kwargs) Bases: :py:obj:`mptt.models.MPTTModel` Base class for tree models. .. py:class:: Meta Bases: :py:obj:`object` .. py:attribute:: unique_together :annotation: = ['parent', 'short_name'] .. py:attribute:: short_name .. py:attribute:: parent .. py:attribute:: problems_in_content .. py:method:: __str__() Return str(self). .. py:method:: get_lang_version(request=None) Tries to get a default language version for a current context (from a given request, then a current thread and then from the settings). If none matching version could be found, just return any. .. py:method:: get_siblings(include_self=False) Wrapper around mptt get_siblings method. Does not consider two root nodes to be siblings. .. py:method:: get_path() .. py:class:: NodeLanguageVersion(*args, **kwargs) Bases: :py:obj:`django.db.models.Model` Make subclasses preserve the alters_data attribute on overridden methods. .. py:class:: Meta Bases: :py:obj:`object` .. py:attribute:: unique_together :annotation: = ['node', 'language'] .. py:attribute:: node .. py:attribute:: language .. py:attribute:: full_name .. py:attribute:: panel_code .. py:class:: Portal(*args, **kwargs) Bases: :py:obj:`django.db.models.Model` Make subclasses preserve the alters_data attribute on overridden methods. .. py:attribute:: owner .. py:attribute:: root .. py:attribute:: short_description .. py:attribute:: is_public .. py:attribute:: link_name .. py:method:: clean() Hook for doing any extra model-wide validation after clean() has been called on every field by self.clean_fields. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field defined by NON_FIELD_ERRORS.