Skip to content

glossary

konigle.models.website.glossary

Glossary term models for the Konigle SDK.

This module provides models for glossary terms including creation, update, and resource representations.

BaseGlossaryTerm

Bases: BaseModel

Base class for glossary term models with common editable fields.

Contains fields that can be set during creation/update. Excludes publication status which is managed through separate API calls.

author = Field(default=None, title='Author', description='Primary author of the term') class-attribute instance-attribute

Primary author of the term.

content = Field(default_factory=dict, title='Content', description='Rich text blocks for the term in EditorJS format') class-attribute instance-attribute

Rich text blocks for the term in EditorJS format.

contributor_ids = Field(default_factory=list, title='Contributor IDs', description='List of contributor IDs for the term') class-attribute instance-attribute

List of contributor IDs for the term.

exclude_from_sitemap = Field(default=False, title='Exclude From Sitemap', description='Whether the term is excluded from sitemap') class-attribute instance-attribute

Whether the term is excluded from sitemap.

handle = Field(default=None, max_length=255, title='Handle', description='Term handle that is part of the URL') class-attribute instance-attribute

Term handle that is part of the URL.

json_ld = Field(default_factory=dict, title='JSON-LD', description='Manual override for JSON-LD structured data') class-attribute instance-attribute

Manual override for JSON-LD structured data.

name = Field(..., max_length=255, title='Name', description='Name for display and search purposes') class-attribute instance-attribute

Name for display and search purposes.

reviewer_ids = Field(default_factory=list, title='Reviewer IDs', description='List of reviewer IDs for the term') class-attribute instance-attribute

List of reviewer IDs for the term.

seo_meta = Field(default=None, title='SEO Meta', description='SEO meta information for the term') class-attribute instance-attribute

SEO meta information for the term.

show_author = Field(default=True, title='Show Author', description='Whether to show contributors and reviewers on the page') class-attribute instance-attribute

Whether to show contributors and reviewers on the page.

subtitle = Field(default='', max_length=255, title='Subtitle', description='Subtitle of the glossary term') class-attribute instance-attribute

Subtitle of the glossary term.

summary = Field(default='', title='Summary', description='Term summary - used for SEO meta description') class-attribute instance-attribute

Term summary - used for SEO meta description if not provided.

title = Field(..., max_length=255, title='Title', description='User facing title of the glossary term') class-attribute instance-attribute

User facing title of the glossary term.

GlossaryTerm

Bases: BaseGlossaryTerm, TimestampedResource

Store glossary term resource model.

Represents a glossary term with content, hierarchy, and publication status.

contributors = Field(default_factory=list, title='Contributors', description='List of contributors for the term') class-attribute instance-attribute

List of contributors for the term.

published = Field(default=False, title='Published', description='Whether the term is published') class-attribute instance-attribute

Whether the term is published.

published_at = Field(None, title='Published At', description='Date and time when the term was published') class-attribute instance-attribute

Date and time when the term was published.

reviewers = Field(default_factory=list, title='Reviewers', description='List of reviewers for the term') class-attribute instance-attribute

List of reviewers for the term.

change_handle(new_handle, redirect=False)

Change the handle of the glossary term.

PARAMETER DESCRIPTION
new_handle

The new handle to set for the term.

TYPE: str

redirect

Whether to create a redirect from the old handle.

TYPE: bool DEFAULT: False

Raises: ValueError: If the new handle is invalid.

publish()

Publish the glossary term.

unpublish()

Unpublish the glossary term.

GlossaryTermCreate

Bases: BaseGlossaryTerm, CreateModel

Model for creating a new glossary term.

Contains all required and optional fields for term creation.

GlossaryTermUpdate

Bases: UpdateModel

Model for updating an existing glossary term.

All fields are optional for partial updates.

author = Field(default=None, title='Author', description='Primary author of the term') class-attribute instance-attribute

Primary author of the term.

content = Field(default=None, title='Content', description='Rich text blocks for the term in EditorJS format') class-attribute instance-attribute

Rich text blocks for the term in EditorJS format.

contributor_ids = Field(default=None, title='Contributor IDs', description='List of contributor IDs for the term') class-attribute instance-attribute

List of contributor IDs for the term.

exclude_from_sitemap = Field(default=None, title='Exclude From Sitemap', description='Whether the term is excluded from sitemap') class-attribute instance-attribute

Whether the term is excluded from sitemap.

json_ld = Field(default=None, title='JSON-LD', description='Manual override for JSON-LD structured data') class-attribute instance-attribute

Manual override for JSON-LD structured data.

name = Field(default=None, max_length=255, title='Name', description='Name for display and search purposes') class-attribute instance-attribute

Name for display and search purposes.

reviewer_ids = Field(default=None, title='Reviewer IDs', description='List of reviewer IDs for the term') class-attribute instance-attribute

List of reviewer IDs for the term.

seo_meta = Field(default=None, title='SEO Meta', description='SEO meta information for the term') class-attribute instance-attribute

SEO meta information for the term.

show_author = Field(default=None, title='Show Author', description='Whether to show contributors and reviewers on the page') class-attribute instance-attribute

Whether to show contributors and reviewers on the page.

subtitle = Field(default=None, max_length=255, title='Subtitle', description='Subtitle of the glossary term') class-attribute instance-attribute

Subtitle of the glossary term.

summary = Field(default=None, title='Summary', description='Term summary - used for SEO meta description') class-attribute instance-attribute

Term summary - used for SEO meta description.

title = Field(default=None, max_length=255, title='Title', description='User facing title of the glossary term') class-attribute instance-attribute

User facing title of the glossary term.