Module signals_notebook.entities.materials_table

Expand source code
import logging
from typing import ClassVar, Literal

from pydantic import Field

from signals_notebook.common_types import EntityType, File
from signals_notebook.entities.contentful_entity import ContentfulEntity

log = logging.getLogger(__name__)


class MaterialsTable(ContentfulEntity):
    type: Literal[EntityType.MATERIAL_TABLE] = Field(allow_mutation=False)
    _template_name: ClassVar = 'materials_table.html'

    @classmethod
    def _get_entity_type(cls) -> EntityType:
        return EntityType.MATERIAL_TABLE

    def get_content(self) -> File:
        return super()._get_content()

Classes

class MaterialsTable (**data: Any)

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

Expand source code
class MaterialsTable(ContentfulEntity):
    type: Literal[EntityType.MATERIAL_TABLE] = Field(allow_mutation=False)
    _template_name: ClassVar = 'materials_table.html'

    @classmethod
    def _get_entity_type(cls) -> EntityType:
        return EntityType.MATERIAL_TABLE

    def get_content(self) -> File:
        return super()._get_content()

Ancestors

Class variables

var type : Literal[]

Methods

def get_content(self) ‑> File
Expand source code
def get_content(self) -> File:
    return super()._get_content()

Inherited members