Skip to content

models

django_spire.knowledge.collection.models

Collection

Bases: HistoryModelMixin, OrderingModelMixin

parent = models.ForeignKey('self', on_delete=(models.CASCADE), related_name='children', related_query_name='child', null=True, blank=True) class-attribute instance-attribute

name = models.CharField(max_length=255) class-attribute instance-attribute

description = models.TextField() class-attribute instance-attribute

services = CollectionService() class-attribute instance-attribute

objects = CollectionQuerySet.as_manager() class-attribute instance-attribute

Meta

verbose_name = 'Collection' class-attribute instance-attribute
verbose_name_plural = 'Collections' class-attribute instance-attribute
db_table = 'django_spire_knowledge_collection' class-attribute instance-attribute
permissions = [('can_access_all_collections', 'Can Access All Collections'), ('can_change_collection_groups', 'Can Change Collection Groups')] class-attribute instance-attribute

__str__

Source code in django_spire/knowledge/collection/models.py
def __str__(self):
    return self.name

CollectionGroup

Bases: Model

collection = models.ForeignKey(Collection, on_delete=(models.CASCADE), related_name='groups', related_query_name='group') class-attribute instance-attribute

auth_group = models.ForeignKey(AuthGroup, on_delete=(models.CASCADE), related_name='collection_groups', related_query_name='collection_group') class-attribute instance-attribute

services = CollectionGroupService() class-attribute instance-attribute