app.apps.blog.models
Blog app Pydantic models.
Classes
|
Request model for creating a blog post. |
|
Media item attached to a blog revision. |
|
Metadata stored in the revision node. |
|
Response model for blog posts. |
|
SEO settings stored in the revision metadata. |
|
Blog settings for a project. |
- class app.apps.blog.models.BlogPostMetadata(**data)[source]
Bases:
BaseModelMetadata stored in the revision node.
- Parameters:
title (str)
author (str)
date (str)
content (str)
- title: str
- author: str
- date: str
- content: str
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class app.apps.blog.models.BlogPostSEO(**data)[source]
Bases:
BaseModelSEO settings stored in the revision metadata.
- Parameters:
title (str | None)
description (str | None)
image (str | None)
canonical_url (str | None)
keywords (List[str] | None)
noindex (bool | None)
- title: str | None
- description: str | None
- image: str | None
- canonical_url: str | None
- keywords: List[str] | None
- noindex: bool | None
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class app.apps.blog.models.BlogPostMedia(**data)[source]
Bases:
BaseModelMedia item attached to a blog revision.
- Parameters:
name (str)
url (str)
content_type (str | None)
- name: str
- url: str
- content_type: str | None
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class app.apps.blog.models.BlogPostCreate(**data)[source]
Bases:
BaseModelRequest model for creating a blog post.
- Parameters:
title (str)
content (str)
space_path (str)
author (str | None)
tags (List[str])
media (List[BlogPostMedia])
seo (BlogPostSEO | None)
- title: str
- content: str
- space_path: str
- author: str | None
- tags: List[str]
- media: List[BlogPostMedia]
- seo: BlogPostSEO | None
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class app.apps.blog.models.BlogPostResponse(**data)[source]
Bases:
BaseModelResponse model for blog posts.
- Parameters:
kref (str)
slug (str)
title (str)
author (str)
date (str)
content (str | None)
tags (List[str])
revision (str)
revisions (List[str])
published (bool)
space_path (str | None)
media (List[BlogPostMedia])
seo (BlogPostSEO | None)
- kref: str
- slug: str
- title: str
- author: str
- date: str
- content: str | None
- tags: List[str]
- revision: str
- revisions: List[str]
- published: bool
- space_path: str | None
- media: List[BlogPostMedia]
- seo: BlogPostSEO | None
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class app.apps.blog.models.BlogSettings(**data)[source]
Bases:
BaseModelBlog settings for a project.
- Parameters:
project_name (str)
post_item_kind (str)
pagination_count (int)
display_type (str)
display_category_filters (bool)
allow_public (bool)
- project_name: str
- post_item_kind: str
- pagination_count: int
- display_type: str
- display_category_filters: bool
- allow_public: bool
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].