#NEWLINE# @ raise_if_unsaved #NEWLINE# def get_siblings( self , include_self = False ) : #NEWLINE# #INDENT# '\n        Creates a ``QuerySet`` containing siblings of this model\n        instance. Root nodes are considered to be siblings of other root\n        nodes.\n\n        If ``include_self`` is ``True``, the ``QuerySet`` will also\n        include this model instance.\n        ' #NEWLINE# if self . is_root_node ( ) : #NEWLINE# #INDENT# queryset = self . _tree_manager . _mptt_filter ( parent = None ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# parent_id = getattr ( self , ( queryset . _mptt_meta . parent_attr + '_id' ) ) #NEWLINE# queryset = self . _tree_manager . _mptt_filter ( parent__pk = parent_id ) #NEWLINE# #UNINDENT# if ( not include_self ) : #NEWLINE# #INDENT# queryset = queryset . exclude ( pk = self . pk ) #NEWLINE# #UNINDENT# return queryset